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

Function Prepare

coderd/dynamicparameters/render.go:53–63  ·  view source on GitHub ↗

Prepare is the entrypoint for this package. It loads the necessary objects & files from the database and returns a Renderer that can be used to render the template version's parameters.

(ctx context.Context, db database.Store, cache files.FileAcquirer, versionID uuid.UUID, options ...func(r *loader))

Source from the content-addressed store, hash-verified

51// files from the database and returns a Renderer that can be used to render the
52// template version's parameters.
53func Prepare(ctx context.Context, db database.Store, cache files.FileAcquirer, versionID uuid.UUID, options ...func(r *loader)) (Renderer, error) {
54 l := &loader{
55 templateVersionID: versionID,
56 }
57
58 for _, opt := range options {
59 opt(l)
60 }
61
62 return l.Renderer(ctx, db, cache)
63}
64
65func WithTemplateVariableValues(vals []database.TemplateVersionVariable) func(r *loader) {
66 return func(r *loader) {

Calls 1

RendererMethod · 0.95

Tested by

no test coverage detected