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

Method GetUserChatSpendInPeriod

coderd/database/querier.go:781–781  ·  view source on GitHub ↗

Returns the total spend for a user in the given period. When organization_id is NULL, spend across all organizations is returned (global behavior). Otherwise only spend within the specified organization is included.

(ctx context.Context, arg GetUserChatSpendInPeriodParams)

Source from the content-addressed store, hash-verified

779 // returned (global behavior). Otherwise only spend within the
780 // specified organization is included.
781 GetUserChatSpendInPeriod(ctx context.Context, arg GetUserChatSpendInPeriodParams) (int64, error)
782 GetUserCodeDiffDisplayMode(ctx context.Context, userID uuid.UUID) (string, error)
783 GetUserCount(ctx context.Context, includeSystem bool) (int64, error)
784 // Returns the minimum (most restrictive) group limit for a user.

Callers 4

TestChatsMethod · 0.65
ResolveUsageLimitStatusFunction · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 1

TestChatsMethod · 0.52