fork of indigo with slightly nicer lexgen
at main 1.6 kB view raw
1package data 2 3const ( 4 // maximum size of any CBOR data, in any context, in atproto 5 MAX_CBOR_SIZE = 5 * 1024 * 1024 6 // maximum serialized size of an individual atproto record, in CBOR format 7 MAX_CBOR_RECORD_SIZE = 1 * 1024 * 1024 8 // maximum serialized size of an individual atproto record, in JSON format 9 MAX_JSON_RECORD_SIZE = 2 * 1024 * 1024 10 // maximum serialized size of blocks (raw bytes) in an atproto repo stream event (NOT ENFORCED YET) 11 MAX_STREAM_REPO_DIFF_SIZE = 4 * 1024 * 1024 12 // maximum size of a WebSocket frame in atproto event streams (NOT ENFORCED YET) 13 MAX_STREAM_FRAME_SIZE = MAX_CBOR_SIZE 14 // maximum size of any individual string inside an atproto record 15 MAX_RECORD_STRING_LEN = MAX_CBOR_RECORD_SIZE 16 // maximum size of any individual byte array (bytestring) inside an atproto record 17 MAX_RECORD_BYTES_LEN = MAX_CBOR_RECORD_SIZE 18 // limit on size of CID representation (NOT ENFORCED YET) 19 MAX_CID_BYTES = 100 20 // limit on depth of nested containers (objects or arrays) for atproto data (NOT ENFORCED YET) 21 MAX_CBOR_NESTED_LEVELS = 32 22 // maximum number of elements in an object or array in atproto data 23 MAX_CBOR_CONTAINER_LEN = 128 * 1024 24 // largest integer which can be represented in a float64. integers in atproto "should" not be larger than this. (NOT ENFORCED) 25 MAX_SAFE_INTEGER = 9007199254740991 26 // largest negative integer which can be represented in a float64. integers in atproto "should" not go below this. (NOT ENFORCED) 27 MIN_SAFE_INTEGER = -9007199254740991 28 // maximum length of string (UTF-8 bytes) in an atproto object (map) 29 MAX_OBJECT_KEY_LEN = 8192 30)