Download this file
| 1 | package release |
| 2 | |
| 3 | import "context" |
| 4 | |
| 5 | // AppMutationRunner is implemented only by the enabled console store. The |
| 6 | // ordinary bucket implementations do not implement it, so existing callers |
| 7 | // retain their original path when host claims are disabled. |
| 8 | type AppMutationRunner interface { |
| 9 | RunAppMutation(context.Context, string, string, string, func(context.Context) error) error |
| 10 | } |
| 11 | |
| 12 | func WithAppMutation(ctx context.Context, s Store, account, app, action string, f func(context.Context) error) error { |
| 13 | if runner, ok := s.(AppMutationRunner); ok { |
| 14 | return runner.RunAppMutation(ctx, account, app, action, f) |
| 15 | } |
| 16 | return f(ctx) |
| 17 | } |
| 18 | |