(tx *bolt.Tx, id string)
| 245 | } |
| 246 | |
| 247 | func 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 | |
| 259 | func boltUpdateObject(tx *bolt.Tx, object *APIObject) error { |
| 260 | prev, _ := boltGetObject(tx, object.ObjectID) |
no outgoing calls
no test coverage detected