convert

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataToJSON

func DataToJSON(data map[string]interface{}, keys ...string) error

func GetFromResourceData

func GetFromResourceData(
	d *schema.ResourceData, rsc *schema.Resource,
) (map[string]interface{}, error)

func GetResource

func GetResource(
	data map[string]interface{}, rsc *schema.Resource,
) (map[string]interface{}, error)

func GetSchema

func GetSchema(data interface{}, sc *schema.Schema) (interface{}, error)

func InterfaceListToStringList

func InterfaceListToStringList(data []interface{}) []string

func JSONToData

func JSONToData(data map[string]interface{}, keys ...string) error

func ListToMap

func ListToMap(data []interface{}, key string) map[string]interface{}

func MapToList

func MapToList(data map[string]interface{}, key string) []interface{}

func OneSizeListToJSON

func OneSizeListToJSON(data map[string]interface{}, keys ...string) error

func SetResource

func SetResource(data map[string]interface{}, rsc *schema.Resource) (interface{}, error)

func SetResourceData

func SetResourceData(
	d *schema.ResourceData, rsc *schema.Resource, data map[string]interface{},
) error

func SetSchema

func SetSchema(data interface{}, sc *schema.Schema) (interface{}, error)

func SetTypeList

func SetTypeList(data interface{}, sc *schema.Schema) (interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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