intschematag

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HCLIDField   = "HCLID"
	StateIDField = "StateID"
)

Internal field names.

View Source
const InternalFieldName = "-"

InternalFieldName is used for fields not based on the TF schema.

Variables

This section is empty.

Functions

func KeyVal

func KeyVal(s string) (key, val string, ok bool)

KeyVal parses a string in the format "<key>:<value>" form.

Types

type Tag

type Tag struct {
	TFName            string
	Optional          bool
	Computed          bool
	ListEncodedObject bool
	Default           string
	File              bool
}

Tag contains metadata for a intschema struct tag.

func InternalFieldTag

func InternalFieldTag() Tag

InternalFieldTag marks a field which is not part of the resource schema.

func Unmarshal

func Unmarshal(f reflect.StructField) Tag

Unmarshal unmarshals an intschema Tag for the specified struct field.

func (Tag) IgnoreResourceData

func (t Tag) IgnoreResourceData() bool

IgnoreResourceData returns true for fields that should not be used when setting to/from ResourceData. E.g., fields only relevant to HCL marshalling like HCLID.

func (Tag) Marshal

func (t Tag) Marshal() string

Marshal marshals t into a struct tag string.

Jump to

Keyboard shortcuts

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