GetObject gets an object by id
(id string)
| 124 | |
| 125 | // GetObject gets an object by id |
| 126 | func (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 |
| 142 | func (c *Cache) GetObjectsByParent(parent string) ([]*APIObject, error) { |
nothing calls this directly
no test coverage detected