util

package
v0.30.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, resource string, v ...any)

func Created

func Created(ctx context.Context, resource string, v ...any)

func Delete

func Delete(ctx context.Context, resource string, v ...any)

func Deleted

func Deleted(ctx context.Context, resource string, v ...any)

func ExpandStringList

func ExpandStringList(list types.List) []string

func FlattenStringList

func FlattenStringList(list []string) types.List

func GetDataSourceDescription

func GetDataSourceDescription(resourceName string) string

func GetDescriptionDatasourceSchema

func GetDescriptionDatasourceSchema(resourceDescription string) datasourceSchema.Attribute

func GetDescriptionResourceSchema

func GetDescriptionResourceSchema(resourceDescription string) resourceSchema.Attribute

func GetDownloadAttemptsResourceSchema

func GetDownloadAttemptsResourceSchema() resourceSchema.Attribute

func GetDownloadRetryBackoffSecondsResourceSchema

func GetDownloadRetryBackoffSecondsResourceSchema() resourceSchema.Attribute

func GetFeedUriResourceSchema

func GetFeedUriResourceSchema() resourceSchema.Attribute

func GetIdResourceSchema

func GetIdResourceSchema() resourceSchema.Attribute

func GetIds

func GetIds(ids types.List) []string

func GetNameDatasourceSchema

func GetNameDatasourceSchema(isRequired bool) datasourceSchema.Attribute

func GetNameDatasourceWithMaxLengthSchema

func GetNameDatasourceWithMaxLengthSchema(isRequired bool, maxLength int) datasourceSchema.Attribute

func GetNameResourceSchema

func GetNameResourceSchema(isRequired bool) resourceSchema.Attribute

func GetNumber

func GetNumber(val types.Int64) int

func GetPackageAcquisitionLocationOptionsResourceSchema

func GetPackageAcquisitionLocationOptionsResourceSchema() resourceSchema.Attribute

func GetPasswordDataSourceSchema

func GetPasswordDataSourceSchema(isRequired bool) datasourceSchema.Attribute

func GetPasswordResourceSchema

func GetPasswordResourceSchema(isRequired bool) resourceSchema.Attribute

func GetProviderName

func GetProviderName() string

func GetQueryDatasourceTags

func GetQueryDatasourceTags() datasourceSchema.Attribute

func GetQueryIDsDatasourceSchema

func GetQueryIDsDatasourceSchema() datasourceSchema.Attribute

func GetQueryNameDatasourceSchema

func GetQueryNameDatasourceSchema() datasourceSchema.Attribute

func GetQueryPartialNameDatasourceSchema

func GetQueryPartialNameDatasourceSchema() datasourceSchema.Attribute

func GetQuerySkipDatasourceSchema

func GetQuerySkipDatasourceSchema() datasourceSchema.Attribute

func GetQuerySpaceIDDatasourceSchema

func GetQuerySpaceIDDatasourceSchema() datasourceSchema.Attribute

func GetQueryTakeDatasourceSchema

func GetQueryTakeDatasourceSchema() datasourceSchema.Attribute

func GetRequiredStringResourceSchema

func GetRequiredStringResourceSchema(description string) resourceSchema.StringAttribute

func GetResourceSchemaDescription

func GetResourceSchemaDescription(resourceName string) string

func GetSlugDatasourceSchema

func GetSlugDatasourceSchema(resourceDescription string, isReadOnly bool) datasourceSchema.Attribute

func GetSlugResourceSchema

func GetSlugResourceSchema(resourceDescription string) resourceSchema.Attribute

func GetSortOrderDataSourceSchema

func GetSortOrderDataSourceSchema(resourceDescription string) resourceSchema.Attribute

func GetSortOrderResourceSchema

func GetSortOrderResourceSchema(resourceDescription string) resourceSchema.Attribute

func GetSpaceIdResourceSchema

func GetSpaceIdResourceSchema(resourceDescription string) resourceSchema.Attribute

func GetStringOrEmpty

func GetStringOrEmpty(tfAttr interface{}) string

func GetTypeName

func GetTypeName(name string) string

func GetUsernameResourceSchema

func GetUsernameResourceSchema(isRequired bool) resourceSchema.Attribute

func Map

func Map[T, V any](items []T, fn func(T) V) []V

func Read

func Read(ctx context.Context, resource string, v ...any)

func Reading

func Reading(ctx context.Context, resource string, v ...any)

func SetToStringArray

func SetToStringArray(ctx context.Context, set types.Set) ([]string, diag.Diagnostics)

func StringOrNull

func StringOrNull(s string) types.String

func Ternary

func Ternary[T interface{}](condition bool, whenTrue T, whenFalse T) T

func ToValueSlice

func ToValueSlice(slice []string) []attr.Value

func Update

func Update(ctx context.Context, resource string, v ...any)

func Updated

func Updated(ctx context.Context, resource string, v ...any)

Types

type AttributeBuilder

type AttributeBuilder[T any] struct {
	// contains filtered or unexported fields
}

func NewAttributeBuilder

func NewAttributeBuilder[T any]() *AttributeBuilder[T]

func ResourceBool

func ResourceBool() *AttributeBuilder[schema.BoolAttribute]

func ResourceInt64

func ResourceInt64() *AttributeBuilder[schema.Int64Attribute]

func ResourceList

func ResourceList(elementType attr.Type) *AttributeBuilder[schema.ListAttribute]

func ResourceMap

func ResourceMap(elementType attr.Type) *AttributeBuilder[schema.MapAttribute]

func ResourceObject

func ResourceObject(attributeTypes map[string]attr.Type) *AttributeBuilder[schema.ObjectAttribute]

func ResourceSet

func ResourceSet(elementType attr.Type) *AttributeBuilder[schema.SetAttribute]

func (*AttributeBuilder[T]) AttributeTypes

func (b *AttributeBuilder[T]) AttributeTypes(attributeTypes map[string]attr.Type) *AttributeBuilder[T]

func (*AttributeBuilder[T]) Build

func (b *AttributeBuilder[T]) Build() T

func (*AttributeBuilder[T]) Computed

func (b *AttributeBuilder[T]) Computed() *AttributeBuilder[T]

func (*AttributeBuilder[T]) Default

func (b *AttributeBuilder[T]) Default(defaultValue interface{}) *AttributeBuilder[T]

func (*AttributeBuilder[T]) Deprecated

func (b *AttributeBuilder[T]) Deprecated(deprecationMessage string) *AttributeBuilder[T]

func (*AttributeBuilder[T]) Description

func (b *AttributeBuilder[T]) Description(desc string) *AttributeBuilder[T]

func (*AttributeBuilder[T]) ElementType

func (b *AttributeBuilder[T]) ElementType(elementType attr.Type) *AttributeBuilder[T]

func (*AttributeBuilder[T]) Optional

func (b *AttributeBuilder[T]) Optional() *AttributeBuilder[T]

func (*AttributeBuilder[T]) PlanModifiers

func (b *AttributeBuilder[T]) PlanModifiers(modifiers ...any) *AttributeBuilder[T]

func (*AttributeBuilder[T]) Required

func (b *AttributeBuilder[T]) Required() *AttributeBuilder[T]

func (*AttributeBuilder[T]) Sensitive

func (b *AttributeBuilder[T]) Sensitive() *AttributeBuilder[T]

func (*AttributeBuilder[T]) Validators

func (b *AttributeBuilder[T]) Validators(validators ...any) *AttributeBuilder[T]

type DataSourceAttributeBuilder

type DataSourceAttributeBuilder[T any] struct {
	// contains filtered or unexported fields
}

func DataSourceList

func DataSourceList(elementType attr.Type) *DataSourceAttributeBuilder[schema.ListAttribute]

func DataSourceMap

func DataSourceMap(elementType attr.Type) *DataSourceAttributeBuilder[schema.MapAttribute]

func DataSourceSet

func DataSourceSet(elementType attr.Type) *DataSourceAttributeBuilder[schema.SetAttribute]

func NewDataSourceAttributeBuilder

func NewDataSourceAttributeBuilder[T any]() *DataSourceAttributeBuilder[T]

func (*DataSourceAttributeBuilder[T]) Build

func (b *DataSourceAttributeBuilder[T]) Build() T

func (*DataSourceAttributeBuilder[T]) Computed

func (*DataSourceAttributeBuilder[T]) Deprecated

func (b *DataSourceAttributeBuilder[T]) Deprecated(deprecationMessage string) *DataSourceAttributeBuilder[T]

func (*DataSourceAttributeBuilder[T]) Description

func (b *DataSourceAttributeBuilder[T]) Description(desc string) *DataSourceAttributeBuilder[T]

func (*DataSourceAttributeBuilder[T]) ElementType

func (b *DataSourceAttributeBuilder[T]) ElementType(elementType attr.Type) *DataSourceAttributeBuilder[T]

func (*DataSourceAttributeBuilder[T]) Optional

func (*DataSourceAttributeBuilder[T]) Required

func (*DataSourceAttributeBuilder[T]) Sensitive

Jump to

Keyboard shortcuts

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