Documentation
¶
Index ¶
- Constants
- func CtyValueString(val cty.Value) (string, error)
- func SortParameters(lists []Parameter)
- type DiagnosticSeverityString
- type Diagnostics
- type FriendlyDiagnostic
- type HCLString
- type NullHCLString
- type Parameter
- type ParameterData
- type ParameterOption
- type ParameterType
- type ParameterValidation
- type Tag
- type TagBlock
- type TagBlocks
- type Tags
- type WorkspaceOwner
- type WorkspaceOwnerRBACRole
Constants ¶
View Source
const ( BlockTypeParameter = "coder_parameter" BlockTypeWorkspaceTag = "coder_workspace_tag" ValidationMonotonicIncreasing = "increasing" ValidationMonotonicDecreasing = "decreasing" )
@typescript-ignore BlockTypeParameter @typescript-ignore BlockTypeWorkspaceTag
View Source
const (
UnknownStringValue = "??"
)
Variables ¶
This section is empty.
Functions ¶
func CtyValueString ¶
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".
func SortParameters ¶
func SortParameters(lists []Parameter)
Types ¶
type DiagnosticSeverityString ¶
type DiagnosticSeverityString string
const ( DiagnosticSeverityError DiagnosticSeverityString = "error" DiagnosticSeverityWarning DiagnosticSeverityString = "warning" )
type Diagnostics ¶
type Diagnostics hcl.Diagnostics
Diagnostics is a JSON friendly form of hcl.Diagnostics. Data is lost when doing a json marshal.
func (Diagnostics) MarshalJSON ¶
func (d Diagnostics) MarshalJSON() ([]byte, error)
type FriendlyDiagnostic ¶
type FriendlyDiagnostic struct { Severity DiagnosticSeverityString `json:"severity"` Summary string `json:"summary"` Detail string `json:"detail"` }
type HCLString ¶
type HCLString struct { Value cty.Value // ValueDiags are any diagnostics that occurred // while evaluating the value ValueDiags hcl.Diagnostics // ValueExp is the underlying source expression ValueExpr 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
func StringLiteral ¶
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 before calling this function.
func (HCLString) MarshalJSON ¶
func (*HCLString) UnmarshalJSON ¶
type NullHCLString ¶
type Parameter ¶
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. Value HCLString `json:"value"` // Diagnostics is used to store any errors that occur during parsing // of the parameter. Diagnostics Diagnostics `json:"diagnostics"` }
type ParameterData ¶
type ParameterData struct { Name string `json:"name"` DisplayName string `json:"display_name"` Description string `json:"description"` Type ParameterType `json:"type"` FormType provider.ParameterFormType `json:"form_type"` Styling any `json:"styling"` Mutable bool `json:"mutable"` DefaultValue HCLString `json:"default_value"` Icon string `json:"icon"` Options []*ParameterOption `json:"options"` Validations []*ParameterValidation `json:"validations"` Required bool `json:"required"` // legacy_variable_name was removed (= 14) Order int64 `json:"order"` Ephemeral bool `json:"ephemeral"` // Unexported fields, not always available. Source *terraform.Block `json:"-"` }
type ParameterOption ¶
type ParameterType ¶
type ParameterType string
const ( ParameterTypeString ParameterType = "string" ParameterTypeNumber ParameterType = "number" ParameterTypeBoolean ParameterType = "bool" ParameterTypeListString ParameterType = "list(string)" )
func (ParameterType) Valid ¶
func (t ParameterType) Valid() error
type ParameterValidation ¶
type ParameterValidation struct { Error string `json:"validation_error"` // All validation attributes are optional. Regex *string `json:"validation_regex"` Min *int64 `json:"validation_min"` Max *int64 `json:"validation_max"` Monotonic *string `json:"validation_monotonic"` Invalid *bool `json:"validation_invalid"` }
type TagBlocks ¶
type TagBlocks []TagBlock
@typescript-ignore TagBlocks
func (TagBlocks) UnusableTags ¶
type WorkspaceOwner ¶
type WorkspaceOwner struct { ID string `json:"id" cty:"id"` Name string `json:"name" cty:"name"` FullName string `json:"full_name" cty:"full_name"` Email string `json:"email" cty:"email"` SSHPublicKey string `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"` LoginType string `json:"login_type" cty:"login_type"` RBACRoles []WorkspaceOwnerRBACRole `json:"rbac_roles" cty:"rbac_roles"` }
func (*WorkspaceOwner) ToCtyValue ¶
func (o *WorkspaceOwner) ToCtyValue() (cty.Value, error)
type WorkspaceOwnerRBACRole ¶
Click to show internal directories.
Click to hide internal directories.