MCPcopy Index your code
hub / github.com/plexdrive/plexdrive / boltGetObject

Function boltGetObject

drive/cache.go:247–257  ·  view source on GitHub ↗
(tx *bolt.Tx, id string)

Source from the content-addressed store, hash-verified

245}
246
247func boltGetObject(tx *bolt.Tx, id string) (*APIObject, error) {
248 b := tx.Bucket(bObjects)
249 v := b.Get([]byte(id))
250 if v == nil {
251 return nil, fmt.Errorf("Could not find object %v in cache", id)
252 }
253
254 var object APIObject
255 err := json.Unmarshal(v, &object)
256 return &object, err
257}
258
259func boltUpdateObject(tx *bolt.Tx, object *APIObject) error {
260 prev, _ := boltGetObject(tx, object.ObjectID)

Callers 5

GetObjectMethod · 0.85
GetObjectsByParentMethod · 0.85
DeleteObjectMethod · 0.85
boltUpdateObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected