types
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¶
- Constants
- func CtyValueString(val cty.Value) (string, error)
- func CtyValueStringDefault(def string, val cty.Value) string
- func DiagnosticCode(diag *hcl.Diagnostic, code string) *hcl.Diagnostic
- func SetDiagnosticExtra(diag *hcl.Diagnostic, extra DiagnosticExtra)
- func SortParameters(lists []Parameter)
- type DiagnosticExtra
- type DiagnosticSeverityString
- type Diagnostics
- type FriendlyDiagnostic
- type HCLString
- type NullHCLString
- type Parameter
- type ParameterData
- type ParameterOption
- type ParameterStyling
- type ParameterType
- type ParameterValidation
- type Tag
- type TagBlock
- type TagBlocks
- type Tags
- type WorkspaceOwner
- type WorkspaceOwnerRBACRole
Constants¶
const (BlockTypeParameter = "coder_parameter"BlockTypeWorkspaceTag = "coder_workspace_tag"ValidationMonotonicIncreasing = "increasing"ValidationMonotonicDecreasing = "decreasing")
@typescript-ignore BlockTypeParameter@typescript-ignore BlockTypeWorkspaceTag
const (// DiagnosticCodeRequired is used when a parameter value is `null`, but// the parameter is required.DiagnosticCodeRequired = "required")
const (UnknownStringValue = "")
Variables¶
This section is empty.
Functions¶
funcCtyValueString¶
CtyValueString converts a cty.Value to a string.It supports only primitive types - bool, number, and string.As a special case, it also supports map[string]interface{} with key "value".
funcDiagnosticCode¶added inv1.0.0
func DiagnosticCode(diag *hcl.Diagnostic, codestring) *hcl.Diagnostic
funcSetDiagnosticExtra¶added inv1.0.0
func SetDiagnosticExtra(diag *hcl.Diagnostic, extraDiagnosticExtra)
funcSortParameters¶
func SortParameters(lists []Parameter)
Types¶
typeDiagnosticExtra¶added inv1.0.0
type DiagnosticExtra struct {Codestring `json:"code"`// If there was a previous extra, store it here for unwrapping.Wrappedany}
funcExtractDiagnosticExtra¶added inv1.0.0
func ExtractDiagnosticExtra(diag *hcl.Diagnostic)DiagnosticExtra
func (DiagnosticExtra)UnwrapDiagnosticExtra¶added inv1.0.0
func (eDiagnosticExtra) UnwrapDiagnosticExtra() interface{}
typeDiagnosticSeverityString¶
type DiagnosticSeverityStringstring
const (DiagnosticSeverityErrorDiagnosticSeverityString = "error"DiagnosticSeverityWarningDiagnosticSeverityString = "warning")
typeDiagnostics¶
type Diagnostics hcl.Diagnostics
Diagnostics is a JSON friendly form of hcl.Diagnostics.Data is lost when doing a json marshal.
func (Diagnostics)FriendlyDiagnostics¶added inv1.0.0
func (dDiagnostics) FriendlyDiagnostics() []FriendlyDiagnostic
func (Diagnostics)MarshalJSON¶
func (dDiagnostics) MarshalJSON() ([]byte,error)
func (*Diagnostics)UnmarshalJSON¶added inv1.0.0
func (d *Diagnostics) UnmarshalJSON(data []byte)error
typeFriendlyDiagnostic¶
type FriendlyDiagnostic struct {SeverityDiagnosticSeverityString `json:"severity"`Summarystring `json:"summary"`Detailstring `json:"detail"`ExtraDiagnosticExtra `json:"extra"`}
typeHCLString¶
type HCLString struct {Valuecty.Value// ValueDiags are any diagnostics that occurred// while evaluating the valueValueDiags hcl.Diagnostics// ValueExp is the underlying source expressionValueExpr hcl.Expression// Source is the literal hcl text that was parsed.// This is a best effort, it may not be available.Source *string}
@typescript-ignore HCLString
funcNullString¶added inv1.0.0
func NullString()HCLString
funcStringLiteral¶
func (HCLString)AsString¶
AsString is a safe function. It will always return a string.The caller should check if this value is Valid and known beforecalling this function.
func (HCLString)MarshalJSON¶
func (HCLString)NullHCLString¶added inv1.0.0
func (sHCLString) NullHCLString()NullHCLString
func (*HCLString)UnmarshalJSON¶
typeNullHCLString¶
typeParameter¶
type Parameter struct {ParameterData// Value is not immediately cast into a string.// Value is not required at template import, so defer// casting to a string until it is absolutely necessary.ValueHCLString `json:"value"`// Diagnostics is used to store any errors that occur during parsing// of the parameter.DiagnosticsDiagnostics `json:"diagnostics"`}
typeParameterData¶
type ParameterData struct {Namestring `json:"name"`DisplayNamestring `json:"display_name"`Descriptionstring `json:"description"`TypeParameterType `json:"type"`FormTypeprovider.ParameterFormType `json:"form_type"`StylingParameterStyling `json:"styling"`Mutablebool `json:"mutable"`DefaultValueHCLString `json:"default_value"`Iconstring `json:"icon"`Options []*ParameterOption `json:"options"`Validations []*ParameterValidation `json:"validations"`Requiredbool `json:"required"`// legacy_variable_name was removed (= 14)Orderint64 `json:"order"`Ephemeralbool `json:"ephemeral"`// Unexported fields, not always available.Source *terraform.Block `json:"-"`}
func (*ParameterData)CtyType¶
func (r *ParameterData) CtyType() (cty.Type,error)
CtyType returns the cty.Type for the ParameterData.A fixed set of types are supported.
func (*ParameterData)Valid¶added inv1.0.0
func (r *ParameterData) Valid(valueHCLString) hcl.Diagnostics
typeParameterOption¶
typeParameterStyling¶added inv1.0.0
typeParameterType¶
type ParameterTypeprovider.OptionType
TODO: Just use the provider type directly.
const (ParameterTypeStringParameterType = "string"ParameterTypeNumberParameterType = "number"ParameterTypeBooleanParameterType = "bool"ParameterTypeListStringParameterType = "list(string)")
func (ParameterType)Valid¶
func (tParameterType) Valid()error
typeWorkspaceOwner¶
type WorkspaceOwner struct {IDstring `json:"id" cty:"id"`Namestring `json:"name" cty:"name"`FullNamestring `json:"full_name" cty:"full_name"`Emailstring `json:"email" cty:"email"`SSHPublicKeystring `json:"ssh_public_key" cty:"ssh_public_key"`// SSHPrivateKey is intentionally omitted for now, due to the security risk// that exposing it poses.// SSHPrivateKey string `json:"ssh_private_key" cty:"ssh_private_key"`Groups []string `json:"groups" cty:"groups"`// SessionToken is intentionally omitted for now, due to the security risk// that exposing it poses.// SessionToken string `json:"session_token" cty:"session_token"`// OIDCAccessToken is intentionally omitted for now, due to the security risk// that exposing it poses.// OIDCAccessToken string `json:"oidc_access_token" cty:"oidc_access_token"`LoginTypestring `json:"login_type" cty:"login_type"`RBACRoles []WorkspaceOwnerRBACRole `json:"rbac_roles" cty:"rbac_roles"`}
func (*WorkspaceOwner)ToCtyValue¶
func (o *WorkspaceOwner) ToCtyValue() (cty.Value,error)