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

Method CountAIBridgeSessions

coderd/database/dbauthz/dbauthz.go:1807–1813  ·  view source on GitHub ↗
(ctx context.Context, arg database.CountAIBridgeSessionsParams)

Source from the content-addressed store, hash-verified

1805}
1806
1807func (q *querier) CountAIBridgeSessions(ctx context.Context, arg database.CountAIBridgeSessionsParams) (int64, error) {
1808 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceAibridgeInterception.Type)
1809 if err != nil {
1810 return 0, xerrors.Errorf("(dev error) prepare sql filter: %w", err)
1811 }
1812 return q.db.CountAuthorizedAIBridgeSessions(ctx, arg, prep)
1813}
1814
1815func (q *querier) CountAuditLogs(ctx context.Context, arg database.CountAuditLogsParams) (int64, error) {
1816 // Shortcut if the user is an owner. The SQL filter is noticeable,

Callers

nothing calls this directly

Calls 3

prepareSQLFilterFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected