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:
@@ -108,16 +108,17 @@ func (rs *remoteStore) Status(ctx context.Context, ref string) (content.Status,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (rs *remoteStore) Update(ctx context.Context, info content.Info, fieldpaths ...string) error {
|
||||
if _, err := rs.client.Update(ctx, &contentapi.UpdateRequest{
|
||||
func (rs *remoteStore) Update(ctx context.Context, info content.Info, fieldpaths ...string) (content.Info, error) {
|
||||
resp, err := rs.client.Update(ctx, &contentapi.UpdateRequest{
|
||||
Info: infoToGRPC(info),
|
||||
UpdateMask: &protobuftypes.FieldMask{
|
||||
Paths: fieldpaths,
|
||||
},
|
||||
}); err != nil {
|
||||
return errdefs.FromGRPC(err)
|
||||
})
|
||||
if err != nil {
|
||||
return content.Info{}, errdefs.FromGRPC(err)
|
||||
}
|
||||
return nil
|
||||
return infoFromGRPC(resp.Info), nil
|
||||
}
|
||||
|
||||
func (rs *remoteStore) ListStatuses(ctx context.Context, filters ...string) ([]content.Status, error) {
|
||||
|
Reference in New Issue
Block a user