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

Method GetTemplatePresetsWithPrebuilds

coderd/database/querier.go:728–728  ·  view source on GitHub ↗

GetTemplatePresetsWithPrebuilds retrieves template versions with configured presets and prebuilds. It also returns the number of desired instances for each preset. If template_id is specified, only template versions associated with that template will be returned.

(ctx context.Context, templateID uuid.NullUUID)

Source from the content-addressed store, hash-verified

726 // It also returns the number of desired instances for each preset.
727 // If template_id is specified, only template versions associated with that template will be returned.
728 GetTemplatePresetsWithPrebuilds(ctx context.Context, templateID uuid.NullUUID) ([]GetTemplatePresetsWithPrebuildsRow, error)
729 GetTemplateUsageStats(ctx context.Context, arg GetTemplateUsageStatsParams) ([]TemplateUsageStat, error)
730 GetTemplateVersionByID(ctx context.Context, id uuid.UUID) (TemplateVersion, error)
731 GetTemplateVersionByJobID(ctx context.Context, jobID uuid.UUID) (TemplateVersion, error)

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 4

TestPrebuildsMethod · 0.52