MCPcopy Create free account
hub / github.com/coder/coder / GetPresetsAtFailureLimit

Method GetPresetsAtFailureLimit

coderd/database/dbauthz/dbauthz.go:3985–3992  ·  view source on GitHub ↗
(ctx context.Context, hardLimit int64)

Source from the content-addressed store, hash-verified

3983}
3984
3985func (q *querier) GetPresetsAtFailureLimit(ctx context.Context, hardLimit int64) ([]database.GetPresetsAtFailureLimitRow, error) {
3986 // GetPresetsAtFailureLimit returns a list of template version presets that have reached the hard failure limit.
3987 // Request the same authorization permissions as GetPresetsBackoff, since the methods are similar.
3988 if err := q.authorizeContext(ctx, policy.ActionViewInsights, rbac.ResourceTemplate.All()); err != nil {
3989 return nil, err
3990 }
3991 return q.db.GetPresetsAtFailureLimit(ctx, hardLimit)
3992}
3993
3994func (q *querier) GetPresetsBackoff(ctx context.Context, lookback time.Time) ([]database.GetPresetsBackoffRow, error) {
3995 // GetPresetsBackoff returns a list of template version presets along with metadata such as the number of failed prebuilds.

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
AllMethod · 0.80

Tested by

no test coverage detected