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

Method InsertAIBridgeTokenUsage

coderd/database/dbauthz/dbauthz.go:5400–5406  ·  view source on GitHub ↗
(ctx context.Context, arg database.InsertAIBridgeTokenUsageParams)

Source from the content-addressed store, hash-verified

5398}
5399
5400func (q *querier) InsertAIBridgeTokenUsage(ctx context.Context, arg database.InsertAIBridgeTokenUsageParams) (database.AIBridgeTokenUsage, error) {
5401 // All aibridge_token_usages records belong to the initiator of their associated interception.
5402 if err := q.authorizeAIBridgeInterceptionAction(ctx, policy.ActionUpdate, arg.InterceptionID); err != nil {
5403 return database.AIBridgeTokenUsage{}, err
5404 }
5405 return q.db.InsertAIBridgeTokenUsage(ctx, arg)
5406}
5407
5408func (q *querier) InsertAIBridgeToolUsage(ctx context.Context, arg database.InsertAIBridgeToolUsageParams) (database.AIBridgeToolUsage, error) {
5409 // All aibridge_tool_usages records belong to the initiator of their associated interception.

Callers

nothing calls this directly

Tested by

no test coverage detected