utils

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ReadPageSizeLimit int32 = 1000

Variables

View Source
var GlobalMutexStore = newMutexStore()

GlobalMutexStore is a global mutex store.

Functions

func DataSourceAttribute

func DataSourceAttribute(name string, val resourceschema.Attribute, diags *diag.Diagnostics) datasourceschema.Attribute

DataSourceAttribute converts a resource schema attribute to data source schema attribute

func DataSourceAttributeMap

func DataSourceAttributeMap(r map[string]resourceschema.Attribute, diags *diag.Diagnostics) map[string]datasourceschema.Attribute

DataSourceAttributeMap converts a map of resource schema attributes to data source schema attributes

func DataSourceNestedAttributeObject

DataSourceNestedAttributeObject converts a resource schema nested attribute object to data source schema nested attribute object

func ExtractResourceId added in v1.1.0

func ExtractResourceId(id string) string

func Ptr

func Ptr[T any](t T) *T

Ptr is a helper routine that returns a pointer to given value.

func ReadWithPages

func ReadWithPages[T any](read func(offset, limit int32) ([]T, error)) ([]T, error)

func ToComputedAttribute

func ToComputedAttribute(name string, val resourceschema.Attribute) resourceschema.Attribute

ToComputedAttribute converts a resource schema attribute having all attributes set to "computed".

func ToComputedAttributeMap

func ToComputedAttributeMap(r map[string]resourceschema.Attribute) map[string]resourceschema.Attribute

ToComputedAttributeMap converts a map of resource schema attributes to schema attributes with all fields set to "computed".

func ToComputedNestedAttributeObject

ToComputedNestedAttributeObject converts a resource schema nested attribute object to nested attribute object with all fields set to "computed".

Types

This section is empty.

Jump to

Keyboard shortcuts

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