schemas

package
v1.64.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateFormat

func DateFormat(date gjson.Result, source, target string) string

func MapConverter

func MapConverter(input gjson.Result, convFun func(val gjson.Result) any) any

func MapToBoolMap

func MapToBoolMap(input gjson.Result) any

func MapToFloatMap

func MapToFloatMap(input gjson.Result) any

func MapToIntMap

func MapToIntMap(input gjson.Result) any

func MapToStrMap

func MapToStrMap(input gjson.Result) any

func ObjectToList

func ObjectToList(input gjson.Result, convFun func(val gjson.Result) any) any

func PrimSliceConverter

func PrimSliceConverter(input gjson.Result) any

func SliceToBoolList

func SliceToBoolList(input gjson.Result) any

func SliceToFloatList

func SliceToFloatList(input gjson.Result) any

func SliceToIntList

func SliceToIntList(input gjson.Result) any

func SliceToList

func SliceToList(arr gjson.Result, convFun func(val gjson.Result) any) any

func SliceToStrList

func SliceToStrList(input gjson.Result) any

Types

type ListItemGetterFun

type ListItemGetterFun func(i int) any

type ResourceDataWrapper

type ResourceDataWrapper struct {
	ResourceData *schema.ResourceData
}

func NewSchemaWrapper

func NewSchemaWrapper(d *schema.ResourceData) *ResourceDataWrapper

func (*ResourceDataWrapper) Get

func (s *ResourceDataWrapper) Get(key string, keepZero ...bool) any

func (*ResourceDataWrapper) GetToBool added in v1.63.2

func (s *ResourceDataWrapper) GetToBool(key string, keepZero ...bool) any

func (*ResourceDataWrapper) GetToInt added in v1.63.2

func (s *ResourceDataWrapper) GetToInt(key string, keepZero ...bool) any

func (*ResourceDataWrapper) ListToArray

func (s *ResourceDataWrapper) ListToArray(key string, keepZero ...bool) any

ListToArray convert schema.TypeList to Array

func (*ResourceDataWrapper) ListToObject

func (s *ResourceDataWrapper) ListToObject(key string, getter SetItemGetterFun) any

func (*ResourceDataWrapper) ListToSlice

func (s *ResourceDataWrapper) ListToSlice(key string, keepZero bool, getter ListItemGetterFun) any

func (*ResourceDataWrapper) MapToMap

func (s *ResourceDataWrapper) MapToMap(key string, keepZero bool, convFun SetItemGetterFun) any

func (*ResourceDataWrapper) MapToStrMap

func (s *ResourceDataWrapper) MapToStrMap(key string) any

func (*ResourceDataWrapper) NewClient

func (s *ResourceDataWrapper) NewClient(cfg *config.Config, serviceName string) (*golangsdk.ServiceClient, error)

func (*ResourceDataWrapper) PrimToArray

func (s *ResourceDataWrapper) PrimToArray(key string, keepZero ...bool) any

PrimToArray primitive data type to Array

func (*ResourceDataWrapper) SetToArray

func (s *ResourceDataWrapper) SetToArray(key string, keepZero ...bool) any

SetToArray convert schema.Set to Array

func (*ResourceDataWrapper) SetToObject

func (s *ResourceDataWrapper) SetToObject(key string, getter SetItemGetterFun) any

func (*ResourceDataWrapper) SetToSlice

func (s *ResourceDataWrapper) SetToSlice(key string, getter SetItemGetterFun) []any

type SetItemGetterFun

type SetItemGetterFun func(item any) any

Jump to

Keyboard shortcuts

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