UpdateProvider applies a sparse patch.
(ctx context.Context, name string, patch ProviderPatch)
| 138 | |
| 139 | // UpdateProvider applies a sparse patch. |
| 140 | func (s Store) UpdateProvider(ctx context.Context, name string, patch ProviderPatch) error { |
| 141 | file, err := s.ListProviders(ctx) |
| 142 | if err != nil { |
| 143 | return err |
| 144 | } |
| 145 | if err := providers.Update(&file, name, patch); err != nil { |
| 146 | return err |
| 147 | } |
| 148 | return s.upsertProvider(ctx, name, file.Endpoints[name]) |
| 149 | } |
| 150 | |
| 151 | // RemoveProvider deletes a provider. |
| 152 | func (s Store) RemoveProvider(ctx context.Context, name string) bool { |