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

Method GetPresetsBackoff

coderd/database/dbauthz/dbauthz.go:3994–4000  ·  view source on GitHub ↗
(ctx context.Context, lookback time.Time)

Source from the content-addressed store, hash-verified

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.
3996 if err := q.authorizeContext(ctx, policy.ActionViewInsights, rbac.ResourceTemplate.All()); err != nil {
3997 return nil, err
3998 }
3999 return q.db.GetPresetsBackoff(ctx, lookback)
4000}
4001
4002func (q *querier) GetPresetsByTemplateVersionID(ctx context.Context, templateVersionID uuid.UUID) ([]database.TemplateVersionPreset, error) {
4003 // An actor can read template version presets if they can read the related template version.

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
AllMethod · 0.80
GetPresetsBackoffMethod · 0.65

Tested by

no test coverage detected