Documentation ¶
Index ¶
- func DecodeJSON(data map[string]interface{}, v interface{}) error
- func HclWriteBlocks(blocks []*HCLResourceBlock) ([]byte, error)
- func MapToCtyValWithSchema(m map[string]interface{}, s map[string]*schema.Schema) (cty.Value, error)
- func NewConfig() *transport_tpg.Config
- func ParseFieldValue(url string, name string) string
- type Converter
- type HCLResourceBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes the map object into the target struct.
func HclWriteBlocks ¶ added in v5.18.0
func HclWriteBlocks(blocks []*HCLResourceBlock) ([]byte, error)
HclWriteBlocks prints HCLResourceBlock objects as string.
func MapToCtyValWithSchema ¶
func MapToCtyValWithSchema(m map[string]interface{}, s map[string]*schema.Schema) (cty.Value, error)
MapToCtyValWithSchema normalizes and converts resource from untyped map format to TF JSON.
Normalization is a post-processing of the output map, which does the following: * Converts unmarshallable "schema.Set" to marshallable counterpart. * Strips out properties, which are not part ofthe resource TF schema.
func NewConfig ¶ added in v5.18.0
func NewConfig() *transport_tpg.Config
func ParseFieldValue ¶
ParseFieldValue extracts named part from resource url.
Types ¶
type Converter ¶
type Converter interface { // Convert turns assets into hcl blocks. Convert(asset []*caiasset.Asset) ([]*HCLResourceBlock, error) }
Converter interface for resources.
type HCLResourceBlock ¶
HCLResourceBlock identifies the HCL block's labels and content.
Click to show internal directories.
Click to hide internal directories.