( logger slog.Logger, authorizer rbac.Authorizer, fetchFunc Fetch, updateQuery UpdateQuery, )
| 963 | } |
| 964 | |
| 965 | func updateWithReturn[ |
| 966 | ObjectType rbac.Objecter, |
| 967 | ArgumentType any, |
| 968 | Fetch func(ctx context.Context, arg ArgumentType) (ObjectType, error), |
| 969 | UpdateQuery func(ctx context.Context, arg ArgumentType) (ObjectType, error), |
| 970 | ]( |
| 971 | logger slog.Logger, |
| 972 | authorizer rbac.Authorizer, |
| 973 | fetchFunc Fetch, |
| 974 | updateQuery UpdateQuery, |
| 975 | ) UpdateQuery { |
| 976 | return fetchAndQuery(logger, authorizer, policy.ActionUpdate, fetchFunc, updateQuery) |
| 977 | } |
| 978 | |
| 979 | func update[ |
| 980 | ObjectType rbac.Objecter, |
no test coverage detected