1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
denoland-deno/cli/msg.fbs

135 lines
1.7 KiB
Text
Raw Normal View History

union Any {
Read,
ReadRes,
Seek,
Write,
WriteRes,
2018-07-04 14:50:28 -04:00
}
enum ErrorKind: byte {
NoError = 0,
// io errors
NotFound,
PermissionDenied,
ConnectionRefused,
ConnectionReset,
ConnectionAborted,
NotConnected,
AddrInUse,
AddrNotAvailable,
BrokenPipe,
AlreadyExists,
WouldBlock,
InvalidInput,
InvalidData,
TimedOut,
Interrupted,
WriteZero,
Other,
UnexpectedEof,
2018-10-10 11:15:47 -04:00
BadResource,
CommandFailed,
// url errors
EmptyHost,
IdnaError,
InvalidPort,
InvalidIpv4Address,
InvalidIpv6Address,
InvalidDomainCharacter,
RelativeUrlWithoutBase,
RelativeUrlWithCannotBeABaseBase,
SetHostOnCannotBeABaseUrl,
Overflow,
// hyper errors
HttpUser,
HttpClosed,
HttpCanceled,
HttpParse,
HttpOther,
TooLarge,
// custom errors
InvalidUri,
InvalidSeekMode,
2019-06-19 22:07:01 -04:00
OpNotAvailable,
WorkerInitFailed,
UnixError,
2019-06-17 21:02:08 -04:00
NoAsyncSupport,
NoSyncSupport,
2019-06-09 09:08:20 -04:00
ImportMapError,
InvalidPath,
ImportPrefixMissing,
UnsupportedFetchScheme,
TooManyRedirects,
2019-06-19 22:07:01 -04:00
// other kinds
Diagnostic,
JSError,
}
2018-10-13 16:03:27 -04:00
table Cwd {}
table CwdRes {
cwd: string;
}
2018-10-21 22:14:27 -04:00
enum MediaType: byte {
JavaScript = 0,
TypeScript,
Json,
Unknown
}
table Base {
cmd_id: uint32;
2018-12-12 08:24:36 -05:00
sync: bool = false;
error_kind: ErrorKind = NoError;
error: string;
inner: Any;
2018-07-04 14:50:28 -04:00
}
table FormatError {
error: string;
}
table FormatErrorRes {
error: string;
}
2018-11-02 20:09:10 -04:00
table KeyValue {
2018-09-07 18:59:02 -04:00
key: string;
value: string;
}
table Read {
rid: uint32;
// (ptr, len) is passed as second parameter to Deno.core.send().
}
table ReadRes {
nread: uint;
eof: bool;
}
table Write {
rid: uint32;
}
table WriteRes {
nbyte: uint;
}
table Seek {
rid: uint32;
offset: int;
whence: uint;
}
root_type Base;