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

Method GetPresetsByTemplateVersionID

coderd/database/dbauthz/dbauthz.go:4002–4010  ·  view source on GitHub ↗
(ctx context.Context, templateVersionID uuid.UUID)

Source from the content-addressed store, hash-verified

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.
4004 _, err := q.GetTemplateVersionByID(ctx, templateVersionID)
4005 if err != nil {
4006 return nil, err
4007 }
4008
4009 return q.db.GetPresetsByTemplateVersionID(ctx, templateVersionID)
4010}
4011
4012func (q *querier) GetPreviousTemplateVersion(ctx context.Context, arg database.GetPreviousTemplateVersionParams) (database.TemplateVersion, error) {
4013 // An actor can read the previous template version if they can read the related template.

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected