Movatterモバイル変換


[0]ホーム

URL:


preview

packagemodule
v1.0.1Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2025 License:AGPL-3.0Imports:24Imported by:1

Details

Repository

github.com/coder/preview

Links

README

Coder Logo LightCoder Logo Dark

Workspace Parameters sourced from Terraform



Coder Repo |Docs |Why Coder |Premium

discordreleasegodocGo Report CardOpenSSF Best Practiceslicense

This repository contains a component of Coder, currently called Preview, that extracts and managesworkspace parametersfrom Terraform configurations.

It provides real-time validation to verify user selections and compatibility while presenting dynamic form controls thatadapt based on previous choices.

As users select parameters from the template, Preview validates the selection for compatibility and user entitlements.The form updates other fields based on the selections and only shows relevant and compatible options.

Once Preview is incorporated in Coder, it will allow template admins to use a variety of form controls with dependenciesfrom which users can deploy their ideal workspaces.

Coder Hero Image

Support

Do you have a workspace template that has incorrect parameters? Please openworkspace template behavior issue.

For other bugs, feature requests, etc, feel free toopen an issue.

Join our Discord to provide feedback on in-progressfeatures and chat with the community using Coder!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeInput

type Input struct {// PlanJSONPath is an optional path to a plan file. If PlanJSON isn't// specified, and PlanJSONPath is, then the file will be read and treated// as if the contents were passed in directly.PlanJSONPathstringPlanJSONjson.RawMessageParameterValues map[string]stringOwnertypes.WorkspaceOwnerLogger          *slog.Logger}

func (Input)RichParameterValue

func (iInput) RichParameterValue(keystring) (string,bool)

typeOutput

type Output struct {// ModuleOutput is any 'output' values from the terraform files. This has 0// effect on the parameters, tags, etc. It can be helpful for debugging, as it// allows exporting some terraform values to the caller to review.//// JSON marshalling is handled in the custom methods.ModuleOutputcty.Value `json:"-"`Parameters    []types.Parameter `json:"parameters"`WorkspaceTagstypes.TagBlocks   `json:"workspace_tags"`// Files is included for printing diagnostics.// They can be marshalled, but not unmarshalled. This is a limitation// of the HCL library.Files map[string]*hcl.File `json:"-"`}

funcPreview

func Preview(ctxcontext.Context, inputInput, dirfs.FS) (output *Output, diagnostics hcl.Diagnostics)

func (Output)MarshalJSONadded inv1.0.0

func (oOutput) MarshalJSON() ([]byte,error)

MarshalJSON includes the ModuleOutput and files in the JSON output. Outputshould never be unmarshalled. Marshalling to JSON is strictly useful fordebugging information.

Source Files

View all Source files

Directories

PathSynopsis
cmd
internal
Package gorules defines custom lint rules for ruleguard.
Package gorules defines custom lint rules for ruleguard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp