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

Method GetObject

drive/cache.go:126–139  ·  view source on GitHub ↗

GetObject gets an object by id

(id string)

Source from the content-addressed store, hash-verified

124
125// GetObject gets an object by id
126func (c *Cache) GetObject(id string) (object *APIObject, err error) {
127 Log.Tracef("Getting object %v", id)
128
129 c.db.View(func(tx *bolt.Tx) error {
130 object, err = boltGetObject(tx, id)
131 return nil
132 })
133 if nil != err {
134 return nil, err
135 }
136
137 Log.Tracef("Got object from cache %v", object)
138 return object, err
139}
140
141// GetObjectsByParent get all objects under parent id
142func (c *Cache) GetObjectsByParent(parent string) ([]*APIObject, error) {

Callers

nothing calls this directly

Calls 1

boltGetObjectFunction · 0.85

Tested by

no test coverage detected