Documentation ¶
Index ¶
Constants ¶
View Source
const ( DatabaseObject = HeaderType('D') CollectionObject = HeaderType('C') DocumentObject = HeaderType('O') IndexObject = HeaderType('I') )
View Source
const ( PrimaryIndex = IndexType(1) SecondaryIndex = IndexType(2) )
View Source
const (
CBOR = DocumentType(1)
)
View Source
const (
V1 = Version(1)
)
Variables ¶
View Source
var CollectionKeyHeader = [2]byte{byte(CollectionObject), byte(byte(CBOR) | HeaderByteFromVersion(V1))}
View Source
var DatabaseKeyHeader = [2]byte{byte(DatabaseObject), byte(byte(CBOR) | HeaderByteFromVersion(V1))}
View Source
var DocumentKeyHeader = [2]byte{byte(DocumentObject), byte(byte(CBOR) | HeaderByteFromVersion(V1))}
View Source
var PrimaryIndexHeader = [2]byte{byte(IndexObject), byte(byte(PrimaryIndex) | HeaderByteFromVersion(V1))}
View Source
var SecondaryIndexHeader = [2]byte{byte(IndexObject), byte(byte(SecondaryIndex) | HeaderByteFromVersion(V1))}
Functions ¶
func HeaderByteFromVersion ¶
func TypeFromHeaderByte ¶
Types ¶
type HeaderType ¶
type HeaderType byte
type Key ¶
Key represents an object key.
func NewKeyWith ¶
NewKeyWith returns a new key from the specified header and key elements.
type KeyHeader ¶
type KeyHeader [2]byte
KeyHeader represents a header for all keys.
func NewKeyHeaderFrom ¶
NewKeyHeader creates a new key header from the specified bytes.
func (KeyHeader) DocumentType ¶
func (header KeyHeader) DocumentType() DocumentType
DocumentType returns a document type.
Click to show internal directories.
Click to hide internal directories.