MCPcopy Index your code
hub / github.com/coder/coder / updateWithReturn

Function updateWithReturn

coderd/database/dbauthz/dbauthz.go:965–977  ·  view source on GitHub ↗
(
	logger slog.Logger,
	authorizer rbac.Authorizer,
	fetchFunc Fetch,
	updateQuery UpdateQuery,
)

Source from the content-addressed store, hash-verified

963}
964
965func 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
979func update[
980 ObjectType rbac.Objecter,

Callers 9

UpdateGroupByIDMethod · 0.85
UpdateOrganizationMethod · 0.85
UpdateUserLastSeenAtMethod · 0.85
UpdateUserStatusMethod · 0.85
UpdateWorkspaceMethod · 0.85
UpdateWorkspaceProxyMethod · 0.85

Calls 1

fetchAndQueryFunction · 0.85

Tested by

no test coverage detected