(ctx context.Context, image images.Image)
| 64 | } |
| 65 | |
| 66 | func (s *remoteImages) Create(ctx context.Context, image images.Image) (images.Image, error) { |
| 67 | req := &imagesapi.CreateImageRequest{ |
| 68 | Image: imageToProto(&image), |
| 69 | } |
| 70 | if tm := epoch.FromContext(ctx); tm != nil { |
| 71 | req.SourceDateEpoch = timestamppb.New(*tm) |
| 72 | } |
| 73 | created, err := s.client.Create(ctx, req) |
| 74 | if err != nil { |
| 75 | return images.Image{}, errgrpc.ToNative(err) |
| 76 | } |
| 77 | |
| 78 | return imageFromProto(created.Image), nil |
| 79 | } |
| 80 | |
| 81 | func (s *remoteImages) Update(ctx context.Context, image images.Image, fieldpaths ...string) (images.Image, error) { |
| 82 | var updateMask *ptypes.FieldMask |
nothing calls this directly
no test coverage detected