Download this file
| 1 | package provision |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | |
| 6 | "github.com/carlosframework/platform/internal/release" |
| 7 | ) |
| 8 | |
| 9 | // UpdateRecord is claimRawUpdateRecord under the app mutation of the record's |
| 10 | // own account and app. It rewrites an existing record whose protected |
| 11 | // (lifecycle) fields must stay equal, so it is an ordinary app write; create, |
| 12 | // delete, move and retirement keep their lifecycle operations and are not |
| 13 | // routed here. Ordinary stores do not implement release.AppMutationRunner, so |
| 14 | // with host claims off the body runs unchanged. |
| 15 | func UpdateRecord(ctx context.Context, s release.Store, rec Record, etag string) error { |
| 16 | return release.WithAppMutation(ctx, s, rec.Account, rec.App, "provision.UpdateRecord", func(ctx context.Context) error { |
| 17 | return claimRawUpdateRecord(ctx, s, rec, etag) |
| 18 | }) |
| 19 | } |
| 20 | |