Documentation
¶
Overview ¶
Package variable is responsible for workspace variables
Index ¶
- Constants
- Variables
- func NewApplication(opts ApplicationOptions) *app
- func VariableCategoryPtr(v otf.VariableCategory) *otf.VariableCategory
- type ApplicationOptions
- type Client
- type Variable
- func (v *Variable) Category() otf.VariableCategory
- func (v *Variable) Description() string
- func (v *Variable) HCL() bool
- func (v *Variable) ID() string
- func (v *Variable) Key() string
- func (v *Variable) MarshalLog() any
- func (v *Variable) Sensitive() bool
- func (v *Variable) ToJSONAPI() any
- func (v *Variable) Update(opts otf.UpdateVariableOptions) error
- func (v *Variable) Value() string
- func (v *Variable) WorkspaceID() string
- type VariableList
Constants ¶
View Source
const ( // https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables/managing-variables#character-limits VariableDescriptionMaxChars = 512 VariableKeyMaxChars = 128 VariableValueMaxKB = 256 // 256*1024 bytes )
Variables ¶
View Source
var ( ErrVariableDescriptionMaxExceeded = fmt.Errorf("maximum variable description size (%d chars) exceeded", VariableDescriptionMaxChars) ErrVariableKeyMaxExceeded = fmt.Errorf("maximum variable key size (%d chars) exceeded", VariableKeyMaxChars) ErrVariableValueMaxExceeded = fmt.Errorf("maximum variable value size of %d KB exceeded", VariableValueMaxKB) )
Functions ¶
func NewApplication ¶
func NewApplication(opts ApplicationOptions) *app
func VariableCategoryPtr ¶
func VariableCategoryPtr(v otf.VariableCategory) *otf.VariableCategory
VariableCategoryPtr returns a pointer to the given category type.
Types ¶
type ApplicationOptions ¶
type ApplicationOptions struct {
otf.Authorizer
otf.Database
otf.Renderer
otf.WorkspaceService
logr.Logger
}
type Client ¶
type Client struct {
otf.JSONAPIClient
}
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
func NewTestVariable ¶
func NewVariable ¶
func NewVariable(workspaceID string, opts otf.CreateVariableOptions) (*Variable, error)
func (*Variable) Category ¶
func (v *Variable) Category() otf.VariableCategory
func (*Variable) Description ¶
func (*Variable) MarshalLog ¶
func (*Variable) WorkspaceID ¶
type VariableList ¶
type VariableList struct {
// contains filtered or unexported fields
}
VariableList assembles a workspace list JSONAPI DTO
func (*VariableList) ToJSONAPI ¶
func (l *VariableList) ToJSONAPI() any
Click to show internal directories.
Click to hide internal directories.