github.com/git-amp/amp-sdk-go@v0.7.5/amp/amp.proto (about) 1 syntax = "proto3"; 2 3 // package amp is an implementation-independent API for a pluggable client-server UI/UX system, 4 // featuring support and integration for files, media, and communication. 5 package amp; 6 7 // Tells protoc that a .proto file importing amp.proto what package import to use within Go. 8 option go_package = "github.com/git-amp/amp-sdk-go/amp"; 9 10 // import "github.com/gogo/protobuf/gogoproto/gogo.proto"; // https://stackoverflow.com/questions/43026449/gogo-proto-file-not-found 11 12 option csharp_namespace = "AMP"; 13 14 15 enum Const { 16 Const_Defs = 0; 17 18 // TIDBinaryLen is the byte size of a Tx ID ("TID"), a hash with a leading big endian binary time index. 19 // 20 // This allows TIDs to be naturally sorted chronologically naturally. 21 // This facilitates Tx storage and Tx syndication (time-ordered Tx playback). 22 // Importantly, a TxID (32 bytes) is has a UTC16 prefix, allowing efficient LSM storage to scale to billions of Txs. 23 // 24 // Byte layout is designed so that TIDs are sortable by their embedded timestamp: 25 // 0:6 - Standard UTC timestamp in unix seconds (big endian) 26 // 6:8 - Timestamp fraction (big endian) 27 // 8:32 - Signature/hash suffix. 28 Const_TIDBinaryLen = 32; 29 30 // TIDStringLen is the ASCII-compatible string length of a (binary) TID encoded into its base32 form. 31 // The encoding used is the geo-hash base32 alphabet, so that even ascii ordinal string comparisons will correctly sort encoded TIDs by time. 32 Const_TIDStringLen = 52; 33 34 // DefaultServicePort is the default TCP port used to expose amp.Host service. 35 Const_DefaultServicePort = 5192; 36 37 } 38 39 enum TxHeader { 40 TxHeader_0 = 0; 41 42 43 // TxHeader heads a MsgTx serialized data store 44 // Bytes 00:03 -- Reserved (3 bytes) 45 // Bytes 03:07 -- big endian total byte size, including header (4 bytes) 46 // Bytes 07:08 -- TxMsg op code (1 byte) 47 TxHeader_Size = 8; 48 TxHeader_OpOfs = 7; 49 50 TxHeader_OpRecvTx = 20; 51 TxHeader_OpEOS = 24; 52 } 53 54 // These are hard-wired symbol IDs are required to bootstrap a new connection. 55 // After bootstrapping, the client uses RegisterDefs to register its symbols. 56 enum ConstSymbol { 57 ConstSymbol_nil = 0; 58 59 ConstSymbol_Err = 10; 60 ConstSymbol_RegisterDefs = 11; 61 ConstSymbol_HandleURI = 12; 62 ConstSymbol_PinRequest = 13; 63 64 ConstSymbol_Login = 20; 65 ConstSymbol_LoginChallenge = 21; 66 ConstSymbol_LoginResponse = 22; 67 68 // Minimum symbol ID that a client is allowed to issue 69 // This value sets a ceiling for the above hard-wired symbol IDs. 70 ConstSymbol_IssuerInitsAt = 256; 71 } 72 73 // ReqStatus allows a sender to express the status of a request. 74 enum ReqStatus { 75 76 // The request is in the process of being formed 77 ReqStatus_NotStarted = 0; 78 79 // Denotes that the request is in progress. 80 ReqStatus_Syncing = 1; 81 82 // Sent by the host to signal that this ReqID up to date and the client state is stable / synchronized. 83 // This generally drives UI updates or other aggregate cell dependencies. 84 ReqStatus_Synced = 2; 85 86 // From the client to host, this signals to close / cancel the op associated with ReqID. 87 // From the host to client, this signals that the given request ID has been closed / discarded. 88 ReqStatus_Closed = 3; 89 } 90 91 // Msg is thw workhorse generic transport serialization sent between client and host. 92 message Msg { 93 94 // ReqID names an originating request ID, issued by client using an atomic counter. 95 // 96 // For example, if a Msg is a reply to some request, ReqID identifies the originating request\. 97 uint64 ReqID = 1; 98 99 // Status communicates request status / completion. 100 ReqStatus Status = 2; 101 102 // CellTxs is a Cell state update as well as session meta-messaging mechanism. 103 repeated CellTxPb CellTxs = 5; 104 105 } 106 107 // CellTxPb is a cell transaction, a unit of change (or meta message) for a cell. 108 message CellTxPb { 109 CellTxOp Op = 1; 110 111 // Target CellID 112 // If CellID_1 == 0, then this cell is ephemeral (vs persistent). 113 fixed64 CellID_0 = 3; 114 fixed64 CellID_1 = 4; 115 116 repeated AttrElemPb Elems = 8; 117 118 } 119 120 // CellTxOp specifies a cell transaction operation. 121 enum CellTxOp { 122 CellTxOp_MetaAttr = 0; // CellSpec and TargetCell are ignored 123 CellTxOp_UpsertCell = 1; // If the first CellTx, this is the pinned cell, otherwise it is a child cell 124 CellTxOp_RemoveCell = 3; 125 } 126 127 128 // Serialization helper for AttrElem 129 message AttrElemPb { 130 131 // AttrID of the attr being updated (64 bits for future proofing) 132 uint64 AttrID = 1; 133 134 // Serialized value of the attr element -- IAW AttrID 135 bytes ValBuf = 2; 136 137 // Series index (if applicable) 138 int64 SI = 3; 139 } 140 141 142 143 message Login { 144 145 // A byte string identifying user who is logging in (lot limited to UTF8) 146 // This is typically a username or a persistent UID issued by the device OS when the app is (re)installed. 147 string UserUID = 1; 148 149 // HostAddr is network address of the server known to the client (e.g. IP address, localhost, domain name, etc) 150 // archost uses this to as the host name when serving URLs for the client to consume. 151 string HostAddr = 2; 152 153 string DeviceLabel = 8; 154 string DeviceUID = 9; 155 } 156 157 // LoginChallenge is sent from host to client in response to a Login message 158 message LoginChallenge { 159 160 bytes Hash = 1; 161 } 162 163 // LoginChallenge is sent from client to host in response to a LoginChallenge message 164 message LoginResponse { 165 166 bytes HashResp = 1; 167 } 168 169 170 message Symbol { 171 // A symbol ID is 32 bits and corresponds to a real-world const byte strings. 172 // FUTURE: IDs are int64, where client symbols IDs are < 0 and native symbols are > 0. 173 uint32 ID = 1; 174 bytes Name = 2; 175 } 176 177 // RegisterDefs is sent by a client to register its symbols and schemas during a session. 178 message RegisterDefs { 179 repeated Symbol Symbols = 1; 180 repeated AttrSpec Attrs = 2; 181 repeated ItemSelector Selectors = 4; 182 } 183 184 185 186 // AttrSpec fully describes a cell attribute, specifying a name, element type, and series element type. 187 message AttrSpec { 188 189 // Composite expression / invocation of this AttrSpec in the form: 190 // "[{SeriesSpec}]{ElemType}:{AttrName}" 191 // 192 // This the value is used for Msg.AttrID -- it references an AttrSpec. 193 // e.g. "AssetTag", "AssetTag:promo", "[UTC16]Position:past-promo-shoots", 194 uint32 DefID = 1; 195 196 // ElemType identifies this attr's element type and has a form like a subdomain: 197 // "({subTypeName}.)*<typeName>" 198 // 199 // A particular ElemType corresponds to a serializable data type (typically a protobuf or capnp message) 200 // Valid chars are [A-Za-z0-9_-] in addition to '.' that separates identifiers.. 201 // 202 // e.g. 203 // "AssetTag", 204 // "GreetingAttr.tutorial_06.hello-world.learn.arcspace.systems", 205 uint32 ElemType = 3; 206 207 // SeriesSpec specifies how to interpret an attr's SeriesIndex int64 value ("SI") and has the form: 208 // "{SeriesName}[.{SeriesIndexType}]" 209 // 210 // A SeriesSpec includes its underlying SeriesType as a suffix, telling the host to perform necessary handling. 211 // If SeriesSpec is omitted, this attr is a scalar value (and SI is 0 assumed). 212 // 213 // UTC16 and Secs16 are 48.16 fixed signed fractional seconds (one second == 0x10000 ticks), naming a time duration or timestamp. 214 // When naming an absolute timestamp, unix UTC is assumed (0x10000 corresponds to 00:00:01, Jan 1 1970 GMT) 215 // 216 // e.g. "", "UTC16", "Secs16", "Int64", "Locale.Name" -- FUTURE "GeoHash", "NodeID", "TID" 217 uint32 SeriesSpec = 4; 218 219 // SeriesIndexType tells the host how to handle and process attr series index values. 220 // If SeriesSpec is omitted (SeriesSpec = 0), SI index values are considered literals (SeriesIndexType_Literal). 221 SeriesIndexType SeriesIndexType = 5; 222 223 // AttrName differentiates an attribute from others having the same ElemType and SeriesSpec 224 // - Unnamed attrs are common and typically are used to denote a characterizing cell attribute. 225 // - By convention, attr names of series are plural, and reflects that the attr is intended to contain multiple entries (e.g. "[Locale.Name]Labels") 226 // - Valid chars consist of [A-Za-z0-9_-] ('.' is not allowed) 227 // 228 // e.g. "", "playable", "mini", "1440p" 229 uint32 AttrName = 6; 230 231 232 } 233 234 235 enum SeriesIndexType { 236 SeriesIndexType_Literal = 0; // SeriesSpec has no suffix: SI values are literal values (Int64, UTC16, GeoHash) 237 SeriesIndexType_Name = 1; // SeriesSpec ends with ".Name": SI values are string symbol IDs 238 //SeriesIndexTypeCellID = 2; // SI values correspond to Cell TIDs 239 } 240 241 242 enum PinFlags { 243 PinFlags_None = 0; 244 245 // If set, all symbol / attr ID are native symbol IDs. 246 // This is used for apps pinning cells and so are using native (not client) IDs. 247 PinFlags_UseNativeSymbols = 0x01; 248 249 // If set, PinnedCell.ServeState() causes this request (PinContext) to automatically close once state is pushed and synchronized. 250 // Otherwise, the request remains open and the client will receive any state updates until closed. 251 // This is useful when only a snapshot of the cell is needed. 252 PinFlags_CloseOnSync = 0x04; 253 254 // If set, a pinned cell will not send any state updates to the client. 255 // This is useful when only writing to a cell and no state updates are needed. 256 PinFlags_NoSync = 0x08; 257 258 } 259 260 /* 261 // A AttrSet specifies an ordered set of cell attrs. 262 message AttrSet { 263 264 // DefID is used to reference this CellSpec and can be regarded as a type ID since it is a canonic descriptor. 265 // Composite expression / invocation of this CellSpec in the form: 266 // "(Attrs[0],Attrs[1],..)" 267 // 268 // e.g. "(CellHeader,ArtistTour)" 269 // "(AssetTag:promoVideo,[UTC16]TourStop:summer-tour)" 270 uint32 DefID = 1; 271 272 // Attrs is an ordered sequence of AttrSpecs (attr descriptors) 273 repeated uint32 Attrs = 4; 274 } 275 */ 276 277 278 // ItemSelector selects / filters a srt of items (AttrSpec descriptors) 279 message ItemSelector { 280 281 // Composite expression of this ItemSelector in the form: 282 // "(Include[0],Include[1],..)~(Exclude[0],Exclude[1],..)" 283 // 284 uint32 DefID = 1; 285 286 // A set of descriptor IDs explicitly included 287 repeated uint32 Include = 4; 288 289 // A set of descriptor IDs explicitly excluded 290 repeated uint32 Exclude = 5; 291 292 293 // ScopeID specifies an app or scope that should handle this schema's requests. 294 // The reserved value "." denotes the app / scope ID that has registered for AttrSchema.CellDataModel (typical). 295 //string ScopeID = 1; 296 297 // CellDataModel identifies a data model this schema conforms to, in effect it specifies a scope for the attached Attrs. 298 // This URI names a complete data protocol / specification that this collection of AttrSpecs conforms to (and is a subset of). 299 // To an implementing app on the Go side, this URI implies a family of valid possible AttrSpecs to choose from. 300 //uint32 CellDataModel = 3; 301 302 // This describes this *particular* AttrSchema, a particular collection of Attrs (and is implicitly scoped within CellDataModel). 303 // The host (and its apps) generally don't even look at this field since "{CellDataModel}/{Attrs[i].AttrURI}" fully specifies each attr's data model URI. 304 // The can use this for internal identification, usually to link this schema to particular cell view binding. 305 //uint32 SelectorName = 4; 306 307 308 } 309 310 /* 311 message KwArg { 312 string Key = 1; 313 string Val = 5; 314 bytes ValBuf = 6; 315 } 316 */ 317 318 // HandleURI is used as a meta attribute to request a URI is handled, such as an oauth request (host to client) or an oauth response (client to host). 319 message HandleURI { 320 string URI = 1; 321 } 322 323 324 // PinRequest is a client request to "pin" a cell, meaning selected attrs and child cells will be pushed to the client. 325 message PinRequest { 326 327 // ParentReqID, if set, provides context for this request and is typically needed when pinning a cell by ID alone. 328 // Not set if PinURL and/or PinCellID implies that no parent req exists. 329 uint64 ParentReqID = 1; 330 331 // URL specifying the cell to be pinned and whose child cells are to be pushed. 332 // Typically: [[amp://]amp-app-uri/]cell-uri.. 333 string PinURL = 2; 334 335 // Pins a cell specified by its 16 byte ID and is typically a child cell of a pinned cell implied by ParentReqID. 336 // These values are 0 if PinURL is nil or does not require a CellID. 337 uint64 PinCellIDx0 = 3; 338 uint64 PinCellIDx1 = 4; 339 340 // If set, specifies an ItemSelector that filters which attrs of the pinned cell are pushed to the client. 341 uint32 ParentAttrSelector = 5; 342 343 // If set, specifies an ItemSelector that filters which child cells are pushed to the client. 344 uint32 ChildCellSelector = 6; 345 346 // Flags specifies options. 347 PinFlags Flags = 7; 348 349 } 350 351 /* 352 message AttrRange { 353 354 // Explicit list of SI values to be pinned 355 //repeated uint64 ExplicitSIs = 15; 356 357 // If set, *all* Attr items are pinned. 358 //bool AllItems = 2; 359 360 // Specifies the bounding attr SI range to consider (inclusive). 361 // Time series sequences are always emitted from highest (newest) to lowest (oldest). 362 // If both values are 0, no min/max limit is considered to be set. 363 // uint64 SI_Min = 20; 364 // uint64 SI_Max = 21; 365 366 // Specifies what time series index to start and stop reading at (inclusive). 367 uint64 SI_SeekTo = 24; 368 uint64 SI_StopAt = 25; 369 370 // If set, this limits the number of entries returned for each unique from.cell.attr. (0 denotes unlimited) 371 uint64 SI_BatchLimit = 27; 372 } 373 374 */ 375 376 // CordType describes how to interpret coordinates contained in a Position. 377 enum CordType { 378 CordType_Unspecified = 0; 379 CordType_Ordered = 1; // U is order ranking 380 CordType_Plane_Cartesian = 5; // (U,V,W) are cartesian coordinates 381 CordType_Plane_HexEvenR = 6; // (U,V) are hexagonal "even-r" coordinates 382 CordType_Geoid_Sphere = 10; // U is lat, V is long, W is altitude (m) 383 CordType_Geoid_WGS84 = 11; // U is lat, V is long, W is altitude (m) 384 } 385 386 // message GridPos { 387 // int64 U = 3; 388 // int64 V = 4; 389 // int64 W = 5; 390 // } 391 // message GeoPos { 392 // } 393 394 // Position describes a position in space and/or time using a given coordinate system. 395 message Position { 396 CordType CordType = 1; // CordType describing how to interpret U,V,W 397 398 double U = 3; 399 double V = 4; 400 double W = 5; 401 402 float ROU = 6; // radius of uncertainty (meters) 403 } 404 405 406 enum QuadState { 407 QuadState_LatentOff = 0x00; 408 QuadState_LatentOn = 0x01; 409 QuadState_ActiveOff = 0x10; 410 QuadState_ActiveOn = 0x11; 411 } 412 413 414 enum UrlScheme { 415 UrlScheme_Nil = 0; 416 UrlScheme_Data = 1; // "[data:]{mime-type}[[;base64],{data-encoding}]" 417 UrlScheme_Amp = 2; // "[amp:[//hostname/]]{cmd}[/{uri}]?{query}" 418 UrlScheme_File = 3; // "[file://]{hfs-pathname}" 419 UrlScheme_Http = 4; // "[http[s]://]{hostname}[:{port}]/{query}" 420 421 } 422 423 424 425 message AssetTag { 426 QuadState State = 3; 427 428 string ContentType = 5; // describes URI's content type -- e.g. "image/*" -- 429 430 string URI = 7; // URI of asset 431 432 fixed64 UIDx0 = 16; // UID of asset (LSM[0], LSM[1], LSM[2]) 433 fixed64 UIDx1 = 17; 434 fixed64 UIDx2 = 18; 435 436 float Rx0 = 20; // radius along x0 437 float Rx1 = 21; // radius along x1 438 float Rx2 = 22; // radius along x2 439 440 int32 PixelWidth = 28; // Width in pixels 441 int32 PixelHeight = 29; // Height in pixels 442 443 float MeterScale = 30; // Scale in meters (if applicable) 444 445 repeated AssetTag SubTags = 2; 446 447 } 448 449 450 message SheetInfo { 451 // Sheet.Series.AVPlaylist 452 // Sheet.Series.AttrTuple -- expects series with ElemType: .AttrSet 453 // Sheet.Series.Spreadsheet -- expects series with Addr.desc: .xy, ElemType. ?? 454 // Sheet.Series.Surface.Geo -- expects series with Addr.desc: .wsg84 455 // Sheet.Series.Surface.Grid.Ortho -- expects series with Addr.desc: .xy 456 // Sheet.Series.Surface.Grid.Hex -- expects series with Addr.desc: .qr 457 // Sheet.WebBrowser -- expects series whose elements are URLs 458 string AppSheetURI = 1; 459 460 // Bound attr series (e.g. a spreadsheet's columns) 461 repeated AttrSpec BoundSeries = 3; 462 463 // In the name of the delightful and ever-optimistic future, we have a series of asset tags. 464 //AssetTag Self = 5; 465 } 466 467 message SheetGroup { 468 469 repeated SheetInfo SheetCatalog = 1; 470 471 } 472 473 474 475 /* 476 // Content is an extensible content wrapper, offering an optional accompanying MIME type. 477 message Content { 478 479 // uint64 ByteSz = 2; 480 // int64 BlobID = 3; 481 // uint64 SI = 2; 482 483 bytes ContentData = 3; 484 string ContentType = 4; // MIME type (or '/' separated type pathname) 485 486 int64 LinksCellID = 10; // CellSetID with elements AttrSchemaID_CellBase (or nil) 487 488 489 //GeoFix Location = 11; 490 491 } 492 493 message PlanetEpoch { 494 495 // EpochTID is the genesis Tx ID and is only known after this PlanetEpoch is sealed. 496 bytes EpochTID = 1; 497 498 // EpochEntries contains the entries that bootstrap this epoch 499 repeated Msg EpochEntries = 2; 500 501 // CommonName is the commonly used name for this planet 502 string CommonName = 3; 503 504 // Points to the next 505 //PlanetEpoch NextEpoch = 4; 506 } 507 508 */ 509 510 // CryptoKitID identifies an encryption suite that implements ski.CryptoKit 511 enum CryptoKitID { 512 CryptoKit_Nil = 0; 513 CryptoKit_SecretBox_NaCl = 100; 514 CryptoKit_AsymMsg_NaCl = 101; 515 CryptoKit_Signing_NaCl = 102; 516 CryptoKit_Signing_ED25519 = 202; 517 518 } 519 520 message CryptoKey { 521 CryptoKitID CryptoKitID = 1; 522 bytes KeyBytes = 4; 523 } 524 525 526 // CellHeader is a standard attribute for a cell that is presented . 527 // An amp.App fills in what is appropriate and leaves the rest blank. 528 message CellHeader { 529 530 531 string Title = 2; // title, name, or label 532 string Subtitle = 3; // synopsis, summary, tagline, or sub-label 533 string About = 4; // Additional information about this item 534 535 // A Glyph is a representative image or 3D graphic similar to an icon in function. 536 repeated AssetTag Glyphs = 6; 537 538 int64 Created = 8; // Unix UTC16 timestamp (secs x 2^16) 539 int64 Modified = 9; // Unix UTC16 timestamp (secs x 2^16) 540 541 542 // If set, this (typically https:// or amp://) to reproduce this cell (with given archost session) 543 string CellURL = 20; 544 545 // // If set, often a URI that causes UI (re)action. 546 // string ActionURI = 31; 547 548 // Extensible and persistent link, can be any URL -- typically passed to another application or shared with a another human. 549 // E.g. if 'arc://...', this denotes a pinnable URI -- but could be any pinnable URL: ipfs://, https://, ... 550 // But also UI button or settings URI. 551 AssetTag ExternalLink = 22; 552 553 554 } 555 556 557 // AuthToken is an oauth token -- see oauth2.Token 558 message AuthToken { 559 string AccessToken = 1; 560 string TokenType = 2; 561 string RefreshToken = 3; 562 int64 Expiry = 4; // Unix UTC 563 } 564 565 /* 566 567 message LabelAttr { 568 string Main = 1; 569 string Subtext = 2; 570 } 571 message SwitchAttr { 572 string Label = 1; 573 string About = 2; 574 bool Enabled = 2; 575 } 576 577 message EditableTextAttr { 578 string Label = 1; 579 string About = 2; 580 string Content = 3; 581 int Flags = 4; 582 } 583 584 */ 585 586 587 588 message TRS { 589 590 enum VisualScaleMode { 591 AutoScale = 0; 592 FixedScale = 1; 593 } 594 595 // X1, X2, and X3 are coordinates or values expressed in any unit. 596 // A channel client can later declare how to interpret these coordinates so that a channel server and provide indexed services. 597 // Shoutout to the 3 domains that reflect all theoretical completeness: alpha (finite), omega (unending), and the inaccessible cardinal(s). 598 // Special thanks to Michael at Vsauce: https://www.youtube.com/watch?v=SrU9YDoXE88 599 double X1 = 41; 600 double X2 = 42; 601 double X3 = 43; 602 603 // Specifies how scale dynamically changes based on observer position. 604 VisualScaleMode ScaleMode = 50; 605 606 // Scale1..3 express the scale of this placement. 607 // If all three values are 0, they are all implicitly 1. 608 // If Scale2 or Scale3 == 0, then it is implicitly Scale1. 609 float Scale1 = 51; 610 float Scale2 = 52; 611 float Scale3 = 53; 612 613 // Rotate1 - Rotate3 the orientation of this placement using Euler angles. 614 float Rotate1 = 61; 615 float Rotate2 = 62; 616 float Rotate3 = 63; 617 618 } 619 620 621 622 623 624 message FeedParams { 625 float UpdateIntervalMin = 2; 626 float UpdateIntervalMax = 3; 627 } 628 629 message DataSegment { 630 631 632 uint64 ByteOfs = 5; 633 uint64 ByteSz = 6; 634 bytes InlineData = 7; 635 string StreamURI = 9; 636 637 int64 BlobID = 10; 638 639 640 } 641 642 643 644 645 646 647 648 // ErrCode expresses status and error codes. 649 enum ErrCode { 650 ErrCode_NoErr = 0; 651 652 ErrCode_UnnamedErr = 5000; 653 ErrCode_InternalErr = 5001; 654 ErrCode_UnsupportedOp = 5002; 655 ErrCode_Unimplemented = 5003; 656 ErrCode_Timeout = 5004; 657 ErrCode_ShuttingDown = 5005; 658 ErrCode_NotConnected = 5006; 659 ErrCode_AuthFailed = 5007; 660 ErrCode_LoginFailed = 5008; 661 ErrCode_SessionExpired = 5009; 662 663 ErrCode_ReqNotFound = 5010; 664 ErrCode_InvalidReq = 5020; 665 ErrCode_InvalidURI = 5021; 666 ErrCode_BadValue = 5022; 667 668 ErrCode_NothingToCommit = 5030; 669 ErrCode_CommitFailed = 5031; 670 ErrCode_PlanetNotFound = 5032; 671 ErrCode_PlanetFailure = 5033; 672 ErrCode_AppNotFound = 5034; 673 ErrCode_DefNotFound = 5036; 674 ErrCode_MalformedTx = 5040; 675 676 ErrCode_TypeNotFound = 5050; 677 ErrCode_TypeNotRegistered = 5051; 678 ErrCode_BadSchema = 5052; 679 ErrCode_DataFailure = 5053; 680 ErrCode_ExportErr = 5054; 681 ErrCode_PinFailed = 5055; 682 ErrCode_PinContextClosed = 5056; 683 ErrCode_CellNotFound = 5058; 684 ErrCode_ProviderErr = 5059; 685 686 ErrCode_ViolatesAppendOnly = 5100; 687 ErrCode_InsufficientPermissions = 5101; 688 } 689 690 enum LogLevel { 691 LogLevel_Error = 0; 692 LogLevel_Warn = 2; 693 LogLevel_Info = 4; 694 } 695 696 697 // Err is a general purpose error / warning / log message. 698 message Err { 699 700 // Identifies the type of error. 701 ErrCode Code = 1; 702 703 // Severity level 704 LogLevel Level = 2; 705 706 // human-readable info 707 string Msg = 4; 708 }