Update the content interface to return info from update
Namespace keys used by client for uncompressed Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -60,7 +60,7 @@ type Manager interface {
|
||||
// fields will be updated.
|
||||
// Mutable fields:
|
||||
// labels.*
|
||||
Update(ctx context.Context, info Info, fieldpaths ...string) error
|
||||
Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error)
|
||||
|
||||
// Walk will call fn for each item in the content store which
|
||||
// match the provided filters. If no filters are given all
|
||||
|
@@ -93,9 +93,9 @@ func (cs *store) Delete(ctx context.Context, dgst digest.Digest) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cs *store) Update(ctx context.Context, info Info, fieldpaths ...string) error {
|
||||
func (cs *store) Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error) {
|
||||
// TODO: Support persisting and updating mutable content data
|
||||
return errors.Wrapf(errdefs.ErrFailedPrecondition, "update not supported on immutable content store")
|
||||
return Info{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "update not supported on immutable content store")
|
||||
}
|
||||
|
||||
func (cs *store) Walk(ctx context.Context, fn WalkFunc, filters ...string) error {
|
||||
|
Reference in New Issue
Block a user