collections

package
v0.0.0-...-2416616 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CID_FOR_BUCKET uint32 = 0
View Source
const COLLECTION_SUPPORTED_VERSION uint32 = 7

Variables

View Source
var COLLECTION_ID_NIL = errors.New("manifest not found")
View Source
var COLLECTION_NOT_FOUND = errors.New("Collection Not defined")
View Source
var SCOPE_NOT_FOUND = errors.New("Scope Not defined")

Functions

func GetHexToUint32

func GetHexToUint32(keyspaceComponentHexId string) (uint32, error)

func LEB128Dec

func LEB128Dec(data []byte) ([]byte, uint32)

Decodes the encoded value according to LEB128 uint32 scheme Returns the decoded key as byte stream, collectionID as uint32 value

Types

type Collection

type Collection struct {
	Name string `json:"name"`
	UID  string `json:"uid"` // base-16 string
}

type CollectionManifest

type CollectionManifest struct {
	UID    string            `json:"uid"`
	Scopes []CollectionScope `json:"scopes"`
}

func (*CollectionManifest) GetCollectionID

func (cm *CollectionManifest) GetCollectionID(scope, collection string) (uint32, error)

func (*CollectionManifest) GetManifestId

func (cm *CollectionManifest) GetManifestId() string

func (*CollectionManifest) GetScopeAndCollectionID

func (cm *CollectionManifest) GetScopeAndCollectionID(scope, collection string) (uint32, uint32, error)

func (*CollectionManifest) GetScopes

func (cm *CollectionManifest) GetScopes() map[string][]string

type CollectionScope

type CollectionScope struct {
	Name        string       `json:"name"`
	UID         string       `json:"uid"` // base 16 string
	Collections []Collection `json:"collections"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL