dynamicparameters
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- func DiagnosticErrorString(d *hcl.Diagnostic) string
- func DiagnosticsErrorString(d hcl.Diagnostics) string
- func ProvisionerVersionSupportsDynamicParameters(version string) bool
- func ResolveParameters(ctx context.Context, ownerID uuid.UUID, renderer Renderer, firstBuild bool, ...) (map[string]string, error)
- func TemplateVersionParameter(it database.TemplateVersionParameter) previewtypes.Parameter
- func VariableValues(vals []database.TemplateVersionVariable) (map[string]cty.Value, error)
- func WithProvisionerJob(job database.ProvisionerJob) func(r *loader)
- func WithTemplateVariableValues(vals []database.TemplateVersionVariable) func(r *loader)
- func WithTemplateVersion(tv database.TemplateVersion) func(r *loader)
- func WithTerraformValues(values database.TemplateVersionTerraformValue) func(r *loader)
- func WorkspaceOwner(ctx context.Context, db database.Store, org uuid.UUID, ownerID uuid.UUID) (*previewtypes.WorkspaceOwner, error)
- type DiagnosticError
- type Renderer
Constants¶
This section is empty.
Variables¶
var ErrTemplateVersionNotReady =xerrors.New("template version job not finished")
Functions¶
funcDiagnosticErrorString¶added inv2.25.0
func DiagnosticErrorString(d *hcl.Diagnostic)string
funcDiagnosticsErrorString¶added inv2.25.0
func DiagnosticsErrorString(d hcl.Diagnostics)string
funcResolveParameters¶
func ResolveParameters(ctxcontext.Context,ownerIDuuid.UUID,rendererRenderer,firstBuildbool,previousValues []database.WorkspaceBuildParameter,buildValues []codersdk.WorkspaceBuildParameter,presetValues []database.TemplateVersionPresetParameter,) (map[string]string,error)
funcTemplateVersionParameter¶
func TemplateVersionParameter(itdatabase.TemplateVersionParameter)previewtypes.Parameter
funcVariableValues¶added inv2.25.0
VariableValues is a helper function that converts a slice of TemplateVersionVariableinto a map of cty.Value for use in coder/preview.
funcWithProvisionerJob¶
func WithProvisionerJob(jobdatabase.ProvisionerJob) func(r *loader)
funcWithTemplateVariableValues¶added inv2.25.0
func WithTemplateVariableValues(vals []database.TemplateVersionVariable) func(r *loader)
funcWithTemplateVersion¶
func WithTemplateVersion(tvdatabase.TemplateVersion) func(r *loader)
funcWithTerraformValues¶
func WithTerraformValues(valuesdatabase.TemplateVersionTerraformValue) func(r *loader)
funcWorkspaceOwner¶added inv2.25.0
Types¶
typeDiagnosticError¶added inv2.25.0
type DiagnosticError struct {// Message is the human-readable message that will be returned to the user.Messagestring// Diagnostics are top level diagnostics that will be returned as "Detail" in the response.Diagnostics hcl.Diagnostics// KeyedDiagnostics translate to Validation errors in the response. A key could// be a parameter name, or a tag name. This allows diagnostics to be more closely// associated with a specific index/parameter/tag.KeyedDiagnostics map[string]hcl.Diagnostics}
funcCheckPresets¶added inv2.25.0
func CheckPresets(output *preview.Output, diags hcl.Diagnostics) *DiagnosticError
CheckPresets extracts the preset related diagnostics from a template version preset
funcCheckTags¶added inv2.25.0
func CheckTags(output *preview.Output, diags hcl.Diagnostics) *DiagnosticError
func (*DiagnosticError)Append¶added inv2.25.0
func (e *DiagnosticError) Append(keystring, diag *hcl.Diagnostic)
func (*DiagnosticError)Error¶added inv2.25.0
func (e *DiagnosticError) Error()string
Error is a pretty bad format for these errors. Try to avoid using this.
func (*DiagnosticError)Extend¶added inv2.25.0
func (e *DiagnosticError) Extend(keystring, diag hcl.Diagnostics)
func (*DiagnosticError)HasError¶added inv2.25.0
func (e *DiagnosticError) HasError()bool
typeRenderer¶
type Renderer interface {Render(ctxcontext.Context, ownerIDuuid.UUID, values map[string]string) (*preview.Output, hcl.Diagnostics)Close()}
Renderer is able to execute and evaluate terraform with the given inputs.It may use the database to fetch additional state, such as a user's groups,roles, etc. Therefore, it requires an authenticated `ctx`.
'Close()' **must** be called once the renderer is no longer needed.Forgetting to do so will result in a memory leak.
funcPrepare¶
func Prepare(ctxcontext.Context, dbdatabase.Store, cachefiles.FileAcquirer, versionIDuuid.UUID, options ...func(r *loader)) (Renderer,error)
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 thetemplate version's parameters.
Source Files¶
Directories¶
Path | Synopsis |
---|---|
Package rendermock is a generated GoMock package. | Package rendermock is a generated GoMock package. |