Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DataTypeStructure describes a blob entry that contains a // structure. DataTypeStructure = "struct" )
Variables ¶
View Source
var ( // ErrShutdown is returned when a action is attempted against a // store that is shutdown. ErrShutdown = errors.New("store is shutdown") )
Functions ¶
Types ¶
type BlobEntry ¶
type BlobEntry struct { Digest string `json:"digest"` // SHA256 digest of data, hex encoded DataHint string `json:"datahint"` // Hint that describes data, base64 encoded Data string `json:"data"` // Data payload, base64 encoded }
BlobEntry is the structure used to store data in the key-value store.
func NewBlobEntry ¶
NewBlobEntry returns a new BlobEntry.
type BlobKV ¶
type BlobKV interface { // Put saves the provided key-value pairs to the store. This // operation is performed atomically. Put(blobs map[string][]byte, encrypt bool) error // Del deletes the provided blobs from the store. This operation // is performed atomically. Del(keys []string) error // Get returns blobs from the store for the provided keys. An entry // will not exist in the returned map if for any blobs that are not // found. It is the responsibility of the caller to ensure a blob // was returned for all provided keys. Get(keys []string) (map[string][]byte, error) // Closes closes the store connection. Close() }
BlobKV represents a blob key-value store.
type DataDescriptor ¶
type DataDescriptor struct { Type string `json:"type"` // Type of data Descriptor string `json:"descriptor"` // Description of the data ExtraData string `json:"extradata,omitempty"` // Value to be freely used }
DataDescriptor provides hints about a data blob. In practice we JSON encode this struture and stuff it into BlobEntry.DataHint.
Click to show internal directories.
Click to hide internal directories.