types

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzapiDefinition

type AzapiDefinition struct {
	Id                string
	Kind              Kind   // resource or data
	ResourceName      string // azapi_resource, azapi_update_resource, azapi_resource_action
	Label             string // example: test
	AzureResourceType string // example: Microsoft.Network/virtualNetworks
	ApiVersion        string // example: 2020-06-01
	Body              interface{}
	AdditionalFields  map[string]Value // fields like resource_id, parent_id, name, location, action, method
	BodyFormat        BodyFormat       // hcl or json
	LeadingComments   []string
}

func (AzapiDefinition) DeepCopy

func (def AzapiDefinition) DeepCopy() AzapiDefinition

func (AzapiDefinition) Identifier

func (def AzapiDefinition) Identifier() string

func (AzapiDefinition) String

func (def AzapiDefinition) String() string

type BodyFormat

type BodyFormat string
const (
	BodyFormatHcl  BodyFormat = "hcl"
	BodyFormatJson BodyFormat = "json"
)

type Kind

type Kind string
const (
	KindDataSource Kind = "data"
	KindResource   Kind = "resource"
)

type PropertyDependencyMapping

type PropertyDependencyMapping struct {
	IsKey        bool
	ValuePath    string
	LiteralValue string
	Reference    *Reference
}

type RawValue

type RawValue struct {
	Raw string
}

func NewRawValue

func NewRawValue(raw string) RawValue

func (RawValue) DeepCopy

func (v RawValue) DeepCopy() Value

func (RawValue) String

func (v RawValue) String() string

type Reference

type Reference struct {
	Label    string // e.g. "test"
	Kind     string // e.g. "data", "resource", "var"
	Name     string // e.g. "azurerm_resource_group", "azapi_resource"
	Property string // e.g. "id", "name"
}

func (*Reference) IsKnown

func (r *Reference) IsKnown() bool

func (Reference) String

func (r Reference) String() string

type ReferenceValue

type ReferenceValue struct {
	Reference string
}

func NewReferenceValue

func NewReferenceValue(reference string) ReferenceValue

func (ReferenceValue) DeepCopy

func (v ReferenceValue) DeepCopy() Value

func (ReferenceValue) String

func (v ReferenceValue) String() string

type StringLiteralValue

type StringLiteralValue struct {
	Literal string
}

func NewStringLiteralValue

func NewStringLiteralValue(literal string) StringLiteralValue

func (StringLiteralValue) DeepCopy

func (v StringLiteralValue) DeepCopy() Value

func (StringLiteralValue) String

func (v StringLiteralValue) String() string

type Value

type Value interface {
	String() string
	DeepCopy() Value
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL