(ctx context.Context, ref string)
| 304 | } |
| 305 | |
| 306 | func (cs *contentStore) Status(ctx context.Context, ref string) (content.Status, error) { |
| 307 | ns, err := namespaces.NamespaceRequired(ctx) |
| 308 | if err != nil { |
| 309 | return content.Status{}, err |
| 310 | } |
| 311 | |
| 312 | var bref string |
| 313 | if err := view(ctx, cs.db, func(tx *bolt.Tx) error { |
| 314 | bref = getRef(tx, ns, ref) |
| 315 | if bref == "" { |
| 316 | return fmt.Errorf("reference %v: %w", ref, errdefs.ErrNotFound) |
| 317 | } |
| 318 | |
| 319 | return nil |
| 320 | }); err != nil { |
| 321 | return content.Status{}, err |
| 322 | } |
| 323 | |
| 324 | st, err := cs.Store.Status(ctx, bref) |
| 325 | if err != nil { |
| 326 | return content.Status{}, err |
| 327 | } |
| 328 | st.Ref = ref |
| 329 | return st, nil |
| 330 | } |
| 331 | |
| 332 | func (cs *contentStore) Abort(ctx context.Context, ref string) error { |
| 333 | ns, err := namespaces.NamespaceRequired(ctx) |
nothing calls this directly
no test coverage detected