(ctx context.Context, container containers.Container, fieldpaths ...string)
| 122 | } |
| 123 | |
| 124 | func (r *remoteContainers) Update(ctx context.Context, container containers.Container, fieldpaths ...string) (containers.Container, error) { |
| 125 | var updateMask *ptypes.FieldMask |
| 126 | if len(fieldpaths) > 0 { |
| 127 | updateMask = &ptypes.FieldMask{ |
| 128 | Paths: fieldpaths, |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | updated, err := r.client.Update(ctx, &containersapi.UpdateContainerRequest{ |
| 133 | Container: containerToProto(&container), |
| 134 | UpdateMask: updateMask, |
| 135 | }) |
| 136 | if err != nil { |
| 137 | return containers.Container{}, errgrpc.ToNative(err) |
| 138 | } |
| 139 | |
| 140 | return containerFromProto(updated.Container), nil |
| 141 | |
| 142 | } |
| 143 | |
| 144 | func (r *remoteContainers) Delete(ctx context.Context, id string) error { |
| 145 | _, err := r.client.Delete(ctx, &containersapi.DeleteContainerRequest{ |
nothing calls this directly
no test coverage detected