mdlschm

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

README

mdlschm

Documentation

Index

Constants

View Source
const (
	// Tag keys
	TagComputed            = "computed"
	TagOptional            = "optional"
	TagRequired            = "required"
	TagSensitive           = "sensitive"
	TagDeprecationMessage  = "deprecation"
	TagDescription         = "desc"
	TagMarkdownDescription = "md"
	TagPlanModifiers       = "pmods"
	TagSnakeName           = "snake"
	TagValidators          = "valid"
	TagVersion             = "version"
	TagCollection          = "collection"

	// Tag Values
	TagCollectionList = "list"
	TagCollectionSet  = "set"
	TagTrue           = "true"

	TagPlanModifierReplace = "replace"
	TagPlanModifierDefault = "default"
	TagPlanModifierUSFU    = "usfu"

	TagValidatorBetween = "between"
	TagValidatorOneOf   = "oneof"
	TagValidatorNoneOf  = "noneof"

	SpecialTypeBlock = "block"
)

Variables

This section is empty.

Functions

func DefaultValue

func DefaultValue(v attr.Value) tfsdk.AttributePlanModifier

func New

func New(model any) tfsdk.Schema

New converts a model struct into a tfsdk.Schema using field types and tags as cues to the schema details. New supports arbitrary depth of nested structs. New also supports many but not all validators and plan modifiers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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