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

Method GetConnectionLogsOffset

coderd/database/dbauthz/dbauthz.go:3303–3316  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetConnectionLogsOffsetParams)

Source from the content-addressed store, hash-verified

3301}
3302
3303func (q *querier) GetConnectionLogsOffset(ctx context.Context, arg database.GetConnectionLogsOffsetParams) ([]database.GetConnectionLogsOffsetRow, error) {
3304 // Just like with the audit logs query, shortcut if the user is an owner.
3305 err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceConnectionLog)
3306 if err == nil {
3307 return q.db.GetConnectionLogsOffset(ctx, arg)
3308 }
3309
3310 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceConnectionLog.Type)
3311 if err != nil {
3312 return nil, xerrors.Errorf("(dev error) prepare sql filter: %w", err)
3313 }
3314
3315 return q.db.GetAuthorizedConnectionLogsOffset(ctx, arg, prep)
3316}
3317
3318func (q *querier) GetCryptoKeyByFeatureAndSequence(ctx context.Context, arg database.GetCryptoKeyByFeatureAndSequenceParams) (database.CryptoKey, error) {
3319 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceCryptoKey); err != nil {

Callers 1

Calls 5

authorizeContextMethod · 0.95
prepareSQLFilterFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected