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

Method InsertUsageEvent

coderd/database/dbauthz/dbauthz.go:5850–5855  ·  view source on GitHub ↗
(ctx context.Context, arg database.InsertUsageEventParams)

Source from the content-addressed store, hash-verified

5848}
5849
5850func (q *querier) InsertUsageEvent(ctx context.Context, arg database.InsertUsageEventParams) error {
5851 if err := q.authorizeContext(ctx, policy.ActionCreate, rbac.ResourceUsageEvent); err != nil {
5852 return err
5853 }
5854 return q.db.InsertUsageEvent(ctx, arg)
5855}
5856
5857func (q *querier) InsertUser(ctx context.Context, arg database.InsertUserParams) (database.User, error) {
5858 // Always check if the assigned roles can actually be assigned by this actor.

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95
InsertUsageEventMethod · 0.65

Tested by

no test coverage detected