Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomizerFunc ¶
type CustomizerFunc = func(obj any, sf *reflect.StructField, typ reflect.Type, s *schema.Schema) (string, reflect.Kind, bool)
CustomizerFunc is a function used to customize a schema. It returns an optional function name, the amended kind and a bool determining if the field should be skipped.
type DocsFunc ¶
type DocsFunc = func(obj any, sf reflect.StructField) string
DocsFunc is a function that returns the documentation for a struct field.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates Terraform schemas.
func New ¶
func New(docsFn DocsFunc, customizerFn CustomizerFunc, tag string) *Generator
New returns a schema generator.
func (*Generator) ResolveName ¶
func (g *Generator) ResolveName(sf reflect.StructField) string
ResolveName resolves the name of a field.
Click to show internal directories.
Click to hide internal directories.