| 38 | } |
| 39 | |
| 40 | func (s *remoteSandboxStore) Create(ctx context.Context, sandbox sb.Sandbox) (sb.Sandbox, error) { |
| 41 | resp, err := s.client.Create(ctx, &api.StoreCreateRequest{ |
| 42 | Sandbox: sb.ToProto(&sandbox), |
| 43 | }) |
| 44 | if err != nil { |
| 45 | return sb.Sandbox{}, errgrpc.ToNative(err) |
| 46 | } |
| 47 | |
| 48 | return sb.FromProto(resp.Sandbox), nil |
| 49 | } |
| 50 | |
| 51 | func (s *remoteSandboxStore) Update(ctx context.Context, sandbox sb.Sandbox, fieldpaths ...string) (sb.Sandbox, error) { |
| 52 | resp, err := s.client.Update(ctx, &api.StoreUpdateRequest{ |