MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Get

Method Get

lib/datastore/flydb.go:122–131  ·  view source on GitHub ↗

Get retrieves the value associated with `key`; returns []byte if key exists

(key []byte)

Source from the content-addressed store, hash-verified

120
121// Get retrieves the value associated with `key`; returns []byte if key exists
122func (fds *FlyDbStore) Get(key []byte) ([]byte, error) {
123 if len(key) == 0 {
124 return nil, _const.ErrKeyIsEmpty
125 }
126 val, err := fds.conn.Get(key)
127 if err != nil {
128 return nil, err
129 }
130 return val, nil
131}
132
133// SetUint64 is used to set Uint64 value for `key`
134func (fds *FlyDbStore) SetUint64(key []byte, val uint64) error {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected