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

Function fetch

coderd/database/dbauthz/dbauthz.go:1033–1043  ·  view source on GitHub ↗
(
	logger slog.Logger,
	authorizer rbac.Authorizer,
	f DatabaseFunc,
)

Source from the content-addressed store, hash-verified

1031}
1032
1033func fetch[
1034 ArgumentType any,
1035 ObjectType rbac.Objecter,
1036 DatabaseFunc func(ctx context.Context, arg ArgumentType) (ObjectType, error),
1037](
1038 logger slog.Logger,
1039 authorizer rbac.Authorizer,
1040 f DatabaseFunc,
1041) DatabaseFunc {
1042 return fetchWithAction(logger, authorizer, policy.ActionRead, f)
1043}
1044
1045// fetchAndExec uses fetchAndQuery but only returns the error. The naming comes
1046// from SQL 'exec' functions which only return an error.

Callers 15

GetAPIKeyByIDMethod · 0.70
GetAPIKeyByNameMethod · 0.70
GetChatByIDMethod · 0.70
GetChatByIDForUpdateMethod · 0.70
GetGroupByIDMethod · 0.70
GetGroupByOrgAndNameMethod · 0.70
GetLicenseByIDMethod · 0.70

Calls 1

fetchWithActionFunction · 0.85

Tested by

no test coverage detected