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

Method GetChatCostSummary

coderd/database/dbauthz/dbauthz.go:2870–2876  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetChatCostSummaryParams)

Source from the content-addressed store, hash-verified

2868}
2869
2870func (q *querier) GetChatCostSummary(ctx context.Context, arg database.GetChatCostSummaryParams) (database.GetChatCostSummaryRow, error) {
2871 // See GetChatCostPerChat for the authorization rationale.
2872 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceChat.WithOwner(arg.OwnerID.String()).AnyOrganization()); err != nil {
2873 return database.GetChatCostSummaryRow{}, err
2874 }
2875 return q.db.GetChatCostSummary(ctx, arg)
2876}
2877
2878func (q *querier) GetChatDebugLoggingAllowUsers(ctx context.Context) (bool, error) {
2879 // The allow-users flag is a deployment-wide setting read by any

Callers

nothing calls this directly

Calls 5

authorizeContextMethod · 0.95
AnyOrganizationMethod · 0.80
WithOwnerMethod · 0.80
GetChatCostSummaryMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected