ast

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HintDisjunctionOfScalars indicates that the struct was previously
	// represented in the IR by a disjunction of scalars (+ array), the
	// original definition of which is associated to this hint.
	HintDisjunctionOfScalars = "disjunction_of_scalars"

	// HintDiscriminatedDisjunctionOfRefs indicates that the struct was
	// previously represented in the IR by a disjunction of a fixed list of
	// references to structs, the original definition of which is associated
	// to this hint.
	HintDiscriminatedDisjunctionOfRefs = "disjunction_of_refs"

	// HintImplementsVariant indicates that a type implements a variant.
	// ie: dataquery, panelcfg, ...
	HintImplementsVariant = "implements_variant"

	// HintSkipVariantPluginRegistration preserves the variant hint on a type, but
	// tells the jennies to not register it as a plugin.
	HintSkipVariantPluginRegistration = "skip_variant_plugin_registration"

	// HintStringFormatDateTime hints refers to a string that should be formatted
	// as a datetime as defined by RFC 3339, section 5.6 (ex: 2017-07-21T17:32:28Z)
	HintStringFormatDateTime = "string_format_datetime"
)
View Source
const DiscriminatorCatchAll = "cog_discriminator_catch_all"

Variables

View Source
var ErrCannotMergeSchemas = errors.New("can not merge schemas")

Functions

func TypeName

func TypeName(typeDef Type) string

Types

type Argument

type Argument struct {
	Name string
	Type Type
}

func (*Argument) DeepCopy

func (arg *Argument) DeepCopy() Argument

type ArrayType

type ArrayType struct {
	ValueType Type `yaml:"value_type"`
}

func (*ArrayType) AcceptsValue added in v0.0.20

func (t *ArrayType) AcceptsValue(value any) bool

func (ArrayType) DeepCopy

func (t ArrayType) DeepCopy() ArrayType

func (ArrayType) IsArrayOf added in v0.0.20

func (t ArrayType) IsArrayOf(acceptedKinds ...Kind) bool

func (ArrayType) IsArrayOfScalars

func (t ArrayType) IsArrayOfScalars() bool

type Assignment

type Assignment struct {
	// Where
	Path Path

	// What
	Value AssignmentValue

	// How
	Method AssignmentMethod

	Constraints []AssignmentConstraint `json:",omitempty"`

	NilChecks []AssignmentNilCheck `json:",omitempty"`
}

func ArgumentAssignment

func ArgumentAssignment(path Path, argument Argument, opts ...AssignmentOpt) Assignment

func ConstantAssignment

func ConstantAssignment(path Path, value any, opts ...AssignmentOpt) Assignment

func FieldAssignment

func FieldAssignment(field StructField, opts ...AssignmentOpt) Assignment

func (*Assignment) DeepCopy

func (assignment *Assignment) DeepCopy() Assignment

func (*Assignment) HasConstantValue

func (assignment *Assignment) HasConstantValue() bool

type AssignmentConstraint

type AssignmentConstraint struct {
	Argument  Argument
	Op        Op
	Parameter any
}

func (AssignmentConstraint) DeepCopy

func (constraint AssignmentConstraint) DeepCopy() AssignmentConstraint

type AssignmentEnvelope

type AssignmentEnvelope struct {
	Type   Type // Should be a ref or a struct only
	Values []EnvelopeFieldValue
}

func (*AssignmentEnvelope) DeepCopy

func (envelope *AssignmentEnvelope) DeepCopy() AssignmentEnvelope

type AssignmentMethod

type AssignmentMethod string
const (
	DirectAssignment AssignmentMethod = "direct" // `foo = bar`
	AppendAssignment AssignmentMethod = "append" // `foo = append(foo, bar)`
	IndexAssignment  AssignmentMethod = "index"  // `foo[key] = bar`
)

type AssignmentNilCheck

type AssignmentNilCheck struct {
	Path Path

	EmptyValueType Type
}

func (*AssignmentNilCheck) DeepCopy

func (check *AssignmentNilCheck) DeepCopy() AssignmentNilCheck

type AssignmentOpt

type AssignmentOpt func(assignment *Assignment)

func Method

func Method(method AssignmentMethod) AssignmentOpt

func WithTypeConstraints

func WithTypeConstraints(constraints []TypeConstraint) AssignmentOpt

type AssignmentValue

type AssignmentValue struct {
	Argument *Argument           `json:",omitempty"`
	Constant any                 `json:",omitempty"`
	Envelope *AssignmentEnvelope `json:",omitempty"`
}

func (*AssignmentValue) DeepCopy

func (value *AssignmentValue) DeepCopy() AssignmentValue

type Builder

type Builder struct {
	For Object

	// The builder itself
	// These fields are completely derived from the fields above and can be freely manipulated
	// by veneers.
	Package     string
	Name        string
	Properties  []StructField `json:",omitempty"`
	Constructor Constructor   `json:",omitempty"`
	Options     []Option
	VeneerTrail []string `json:",omitempty"`
}

func (*Builder) AddToVeneerTrail

func (builder *Builder) AddToVeneerTrail(veneerName string)

func (*Builder) DeepCopy

func (builder *Builder) DeepCopy() Builder

func (*Builder) MakePath

func (builder *Builder) MakePath(builders Builders, pathAsString string) (Path, error)

func (*Builder) OptionByName

func (builder *Builder) OptionByName(name string) (Option, bool)

type BuilderGenerator

type BuilderGenerator struct {
}

func (*BuilderGenerator) FromAST

func (generator *BuilderGenerator) FromAST(schemas Schemas) []Builder

type BuilderVisitor

type BuilderVisitor struct {
	OnBuilder     VisitBuilderFunc
	OnProperty    VisitPropertyFunc
	OnConstructor VisitConstructorFunc
	OnOption      VisitOptionFunc
	OnArgument    VisitArgumentFunc
	OnAssignment  VisitAssignmentFunc
}

func (*BuilderVisitor) TraverseBuilder

func (visitor *BuilderVisitor) TraverseBuilder(schemas Schemas, builder Builder) (Builder, error)

func (*BuilderVisitor) TraverseConstructor

func (visitor *BuilderVisitor) TraverseConstructor(schemas Schemas, builder Builder, constructor Constructor) (Constructor, error)

func (*BuilderVisitor) TraverseOption

func (visitor *BuilderVisitor) TraverseOption(schemas Schemas, builder Builder, option Option) (Option, error)

func (*BuilderVisitor) Visit

func (visitor *BuilderVisitor) Visit(schemas Schemas, builders Builders) (Builders, error)

func (*BuilderVisitor) VisitArgument

func (visitor *BuilderVisitor) VisitArgument(schemas Schemas, builder Builder, argument Argument) (Argument, error)

func (*BuilderVisitor) VisitAssignment

func (visitor *BuilderVisitor) VisitAssignment(schemas Schemas, builder Builder, assignment Assignment) (Assignment, error)

func (*BuilderVisitor) VisitBuilder

func (visitor *BuilderVisitor) VisitBuilder(schemas Schemas, builder Builder) (Builder, error)

func (*BuilderVisitor) VisitConstructor

func (visitor *BuilderVisitor) VisitConstructor(schemas Schemas, builder Builder, constructor Constructor) (Constructor, error)

func (*BuilderVisitor) VisitOption

func (visitor *BuilderVisitor) VisitOption(schemas Schemas, builder Builder, option Option) (Option, error)

func (*BuilderVisitor) VisitProperty

func (visitor *BuilderVisitor) VisitProperty(schemas Schemas, builder Builder, property StructField) (StructField, error)

type Builders

type Builders []Builder

func (Builders) ByPackage

func (builders Builders) ByPackage(pkg string) Builders

func (Builders) HaveConstantConstructorAssignment

func (builders Builders) HaveConstantConstructorAssignment() bool

func (Builders) LocateAllByObject

func (builders Builders) LocateAllByObject(pkg string, name string) Builders

func (Builders) LocateAllByRef added in v0.0.8

func (builders Builders) LocateAllByRef(ref RefType) Builders

func (Builders) LocateByObject

func (builders Builders) LocateByObject(pkg string, name string) (Builder, bool)

type ComposableSlotType

type ComposableSlotType struct {
	Variant SchemaVariant
}

func (ComposableSlotType) DeepCopy

func (slot ComposableSlotType) DeepCopy() ComposableSlotType

type Constructor

type Constructor struct {
	Args        []Argument   `json:",omitempty"`
	Assignments []Assignment `json:",omitempty"`
}

func (*Constructor) DeepCopy

func (constructor *Constructor) DeepCopy() Constructor

type DisjunctionType

type DisjunctionType struct {
	Branches Types

	// If the branches are references to structs, some languages will need
	// extra context to be able to distinguish between them. Golang, for
	// example, doesn't support sum types (disjunctions of fixed types).
	// To emulate sum types for these languages, we need a way to
	// discriminate against every possible type.
	//
	// To do that, we need two things:
	//	- a discriminator: the name of a field that is present in all types.
	//	  The value of which identifies the type being used.
	//  - a mapping: associating a "discriminator value" to a type.
	Discriminator        string            `json:",omitempty"`
	DiscriminatorMapping map[string]string `json:",omitempty" yaml:"discriminator_mapping"`
}

func (*DisjunctionType) AcceptsValue added in v0.0.20

func (t *DisjunctionType) AcceptsValue(value any) bool

func (DisjunctionType) DeepCopy

func (t DisjunctionType) DeepCopy() DisjunctionType

type EnumType

type EnumType struct {
	Values []EnumValue // possible values. Value types might be different
}

func (*EnumType) AcceptsValue added in v0.0.20

func (t *EnumType) AcceptsValue(value any) bool

func (EnumType) DeepCopy

func (t EnumType) DeepCopy() EnumType

func (EnumType) MemberForValue added in v0.0.6

func (t EnumType) MemberForValue(value any) (EnumValue, bool)

type EnumValue

type EnumValue struct {
	Type  Type
	Name  string
	Value any
}

func (EnumValue) DeepCopy

func (t EnumValue) DeepCopy() EnumValue

type EnvelopeFieldValue

type EnvelopeFieldValue struct {
	Path  Path            // where to assign within the struct/ref
	Value AssignmentValue // what to assign
}

func (*EnvelopeFieldValue) DeepCopy

func (value *EnvelopeFieldValue) DeepCopy() EnvelopeFieldValue

type IntersectionType

type IntersectionType struct {
	Branches []Type
}

func (IntersectionType) DeepCopy

func (inter IntersectionType) DeepCopy() IntersectionType

type JenniesHints

type JenniesHints map[string]any

meant to be used by jennies, to gain a finer control on the codegen from schemas

type Kind

type Kind string
const (
	KindDisjunction Kind = "disjunction"
	KindRef         Kind = "ref"

	KindStruct Kind = "struct"
	KindEnum   Kind = "enum"
	KindMap    Kind = "map"

	KindArray Kind = "array"

	KindScalar       Kind = "scalar"
	KindIntersection Kind = "intersection"

	KindComposableSlot Kind = "composable_slot"
)

type MapType

type MapType struct {
	IndexType Type
	ValueType Type
}

func (*MapType) AcceptsValue added in v0.0.20

func (t *MapType) AcceptsValue(value any) bool

func (MapType) DeepCopy

func (t MapType) DeepCopy() MapType

func (MapType) IsMapOf added in v0.0.20

func (t MapType) IsMapOf(acceptedKinds ...Kind) bool

type Object

type Object struct {
	Name        string
	Comments    []string `json:",omitempty"`
	Type        Type
	SelfRef     RefType
	PassesTrail []string `json:",omitempty"`
}

named declaration of a type

func NewObject

func NewObject(pkg string, name string, objectType Type, passesTrail ...string) Object

func (*Object) AddToPassesTrail

func (object *Object) AddToPassesTrail(trail string)

func (*Object) AsRef

func (object *Object) AsRef() Type

func (Object) DeepCopy

func (object Object) DeepCopy() Object

func (Object) Equal

func (object Object) Equal(other Object) bool

type Op

type Op string
const (
	MinLengthOp        Op = "minLength"
	MaxLengthOp        Op = "maxLength"
	MultipleOfOp       Op = "multipleOf"
	EqualOp            Op = "=="
	NotEqualOp         Op = "!="
	LessThanOp         Op = "<"
	LessThanEqualOp    Op = "<="
	GreaterThanOp      Op = ">"
	GreaterThanEqualOp Op = ">="
)

type Option

type Option struct {
	Name        string
	Comments    []string `json:",omitempty"`
	VeneerTrail []string `json:",omitempty"`
	Args        []Argument
	Assignments []Assignment
	Default     *OptionDefault `json:",omitempty"`
}

func (*Option) AddToVeneerTrail

func (opt *Option) AddToVeneerTrail(veneerName string)

func (*Option) DeepCopy

func (opt *Option) DeepCopy() Option

type OptionDefault

type OptionDefault struct {
	ArgsValues []any
}

type Path

type Path []PathItem

func PathFromStructField

func PathFromStructField(field StructField) Path

func (Path) Append

func (path Path) Append(suffix Path) Path

func (Path) AppendStructField

func (path Path) AppendStructField(field StructField) Path

func (Path) DeepCopy

func (path Path) DeepCopy() Path

func (Path) Last

func (path Path) Last() PathItem

func (Path) RemoveLast added in v0.0.20

func (path Path) RemoveLast() Path

func (Path) String

func (path Path) String() string

type PathIndex added in v0.0.8

type PathIndex struct {
	Argument *Argument
	Constant any // string or int
}

func (PathIndex) DeepCopy added in v0.0.8

func (index PathIndex) DeepCopy() PathIndex

type PathItem

type PathItem struct {
	Identifier string
	Index      *PathIndex
	Type       Type // any
	// useful mostly for composability purposes, when a field Type is "any"
	// and we're trying to "compose in" something of a known type.
	TypeHint *Type `json:",omitempty"`
	// Is this element of the path the root? (ie: a variable, not a member of a struct)
	Root bool
}

func (PathItem) DeepCopy

func (item PathItem) DeepCopy() PathItem

type RefType

type RefType struct {
	ReferredPkg  string `yaml:"referred_pkg"`
	ReferredType string `yaml:"referred_type"`
}

func (RefType) AsType

func (t RefType) AsType() Type

func (RefType) DeepCopy

func (t RefType) DeepCopy() RefType

func (RefType) String

func (t RefType) String() string

type ScalarKind

type ScalarKind string
const (
	KindNull   ScalarKind = "null"
	KindAny    ScalarKind = "any"
	KindBytes  ScalarKind = "bytes"
	KindString ScalarKind = "string"

	KindFloat32 ScalarKind = "float32"
	KindFloat64 ScalarKind = "float64"

	KindUint8  ScalarKind = "uint8"
	KindUint16 ScalarKind = "uint16"
	KindUint32 ScalarKind = "uint32"
	KindUint64 ScalarKind = "uint64"
	KindInt8   ScalarKind = "int8"
	KindInt16  ScalarKind = "int16"
	KindInt32  ScalarKind = "int32"
	KindInt64  ScalarKind = "int64"

	KindBool ScalarKind = "bool"
)

type ScalarType

type ScalarType struct {
	ScalarKind  ScalarKind       `yaml:"scalar_kind"` // bool, bytes, string, int, float, ...
	Value       any              `json:",omitempty"`  // if value isn't nil, we're representing a constant scalar
	Constraints []TypeConstraint `json:",omitempty"`
}

func (*ScalarType) AcceptsValue added in v0.0.20

func (scalarType *ScalarType) AcceptsValue(value any) bool

func (ScalarType) DeepCopy

func (scalarType ScalarType) DeepCopy() ScalarType

func (ScalarType) IsConcrete

func (scalarType ScalarType) IsConcrete() bool

type Schema

type Schema struct {
	Package        string
	Metadata       SchemaMeta `json:",omitempty"`
	EntryPoint     string     `json:",omitempty"`
	EntryPointType Type       `json:",omitempty"`
	Objects        *orderedmap.Map[string, Object]
}

func NewSchema

func NewSchema(pkg string, metadata SchemaMeta) *Schema

func (*Schema) AddObject

func (schema *Schema) AddObject(object Object)

func (*Schema) AddObjects

func (schema *Schema) AddObjects(objects ...Object)

func (*Schema) DeepCopy

func (schema *Schema) DeepCopy() Schema

func (*Schema) HasObject added in v0.0.12

func (schema *Schema) HasObject(name string) bool

func (*Schema) IsComposableVariant added in v0.0.13

func (schema *Schema) IsComposableVariant(variant string) bool

func (*Schema) LocateObject

func (schema *Schema) LocateObject(name string) (Object, bool)

func (*Schema) Merge

func (schema *Schema) Merge(other *Schema) error

func (*Schema) Resolve

func (schema *Schema) Resolve(typeDef Type) (Type, bool)

type SchemaKind

type SchemaKind string
const (
	SchemaKindCore       SchemaKind = "core"
	SchemaKindComposable SchemaKind = "composable"
)

type SchemaMeta

type SchemaMeta struct {
	Kind       SchemaKind    `json:",omitempty"`
	Variant    SchemaVariant `json:",omitempty"`
	Identifier string        `json:",omitempty"`
}

func (SchemaMeta) Equal

func (meta SchemaMeta) Equal(other SchemaMeta) bool

type SchemaVariant

type SchemaVariant string
const (
	SchemaVariantPanel     SchemaVariant = "panelcfg"
	SchemaVariantDataQuery SchemaVariant = "dataquery"
)

type Schemas

type Schemas []*Schema

func (Schemas) Consolidate

func (schemas Schemas) Consolidate() (Schemas, error)

func (Schemas) DeepCopy

func (schemas Schemas) DeepCopy() []*Schema

func (Schemas) Locate

func (schemas Schemas) Locate(pkg string) (*Schema, bool)

func (Schemas) LocateObject

func (schemas Schemas) LocateObject(pkg string, name string) (Object, bool)

func (Schemas) LocateObjectByRef

func (schemas Schemas) LocateObjectByRef(ref RefType) (Object, bool)

func (Schemas) ResolveToType

func (schemas Schemas) ResolveToType(def Type) Type

type StructField

type StructField struct {
	Name        string
	Comments    []string `json:",omitempty"`
	Type        Type
	Required    bool
	PassesTrail []string `json:",omitempty"`
}

func NewStructField

func NewStructField(name string, fieldType Type, opts ...StructFieldOption) StructField

func (*StructField) AddToPassesTrail

func (structField *StructField) AddToPassesTrail(trail string)

func (StructField) DeepCopy

func (structField StructField) DeepCopy() StructField

type StructFieldOption

type StructFieldOption func(field *StructField)

func Comments

func Comments(comments []string) StructFieldOption

func PassesTrail

func PassesTrail(trail string) StructFieldOption

func Required

func Required() StructFieldOption

type StructType

type StructType struct {
	Fields []StructField
}

func (StructType) DeepCopy

func (structType StructType) DeepCopy() StructType

func (StructType) FieldByName

func (structType StructType) FieldByName(name string) (StructField, bool)

type Type

type Type struct {
	Kind     Kind
	Nullable bool
	Default  any `json:",omitempty"`

	Disjunction    *DisjunctionType    `json:",omitempty"`
	Array          *ArrayType          `json:",omitempty"`
	Enum           *EnumType           `json:",omitempty"`
	Map            *MapType            `json:",omitempty"`
	Struct         *StructType         `json:",omitempty"`
	Ref            *RefType            `json:",omitempty"`
	Scalar         *ScalarType         `json:",omitempty"`
	Intersection   *IntersectionType   `json:",omitempty"`
	ComposableSlot *ComposableSlotType `json:",omitempty" yaml:"composable_slot"`

	Hints       JenniesHints `json:",omitempty"`
	PassesTrail []string     `json:",omitempty"`
}

Struct representing every type defined by the IR. Bonus: in a way that can be (un)marshaled to/from JSON, which is useful for unit tests.

func Any

func Any(opts ...TypeOption) Type

func Bool

func Bool(opts ...TypeOption) Type

func Bytes

func Bytes(opts ...TypeOption) Type

func NewArray

func NewArray(valueType Type, opts ...TypeOption) Type

func NewComposableSlot

func NewComposableSlot(variant SchemaVariant) Type

func NewDisjunction

func NewDisjunction(branches Types, opts ...TypeOption) Type

func NewEnum

func NewEnum(values []EnumValue, opts ...TypeOption) Type

func NewIntersection

func NewIntersection(branches []Type) Type

func NewMap

func NewMap(indexType Type, valueType Type, opts ...TypeOption) Type

func NewRef

func NewRef(referredPkg string, referredTypeName string, opts ...TypeOption) Type

func NewScalar

func NewScalar(kind ScalarKind, opts ...TypeOption) Type

func NewStruct

func NewStruct(fields ...StructField) Type

func Null

func Null() Type

func String

func String(opts ...TypeOption) Type

func (*Type) AcceptsValue added in v0.0.20

func (t *Type) AcceptsValue(value any) bool

func (*Type) AddToPassesTrail

func (t *Type) AddToPassesTrail(trail string)

func (Type) AsArray

func (t Type) AsArray() ArrayType

func (Type) AsComposableSlot

func (t Type) AsComposableSlot() ComposableSlotType

func (Type) AsDisjunction

func (t Type) AsDisjunction() DisjunctionType

func (Type) AsEnum

func (t Type) AsEnum() EnumType

func (Type) AsIntersection

func (t Type) AsIntersection() IntersectionType

func (Type) AsMap

func (t Type) AsMap() MapType

func (Type) AsRef

func (t Type) AsRef() RefType

func (Type) AsScalar

func (t Type) AsScalar() ScalarType

func (Type) AsStruct

func (t Type) AsStruct() StructType

func (Type) DeepCopy

func (t Type) DeepCopy() Type

func (Type) HasHint

func (t Type) HasHint(hintName string) bool

func (Type) ImplementedVariant

func (t Type) ImplementedVariant() string

func (Type) ImplementsVariant

func (t Type) ImplementsVariant() bool

func (Type) IsAny

func (t Type) IsAny() bool

func (Type) IsAnyOf

func (t Type) IsAnyOf(kinds ...Kind) bool

func (Type) IsArray

func (t Type) IsArray() bool

func (Type) IsComposableSlot

func (t Type) IsComposableSlot() bool

func (Type) IsConcreteScalar

func (t Type) IsConcreteScalar() bool

func (Type) IsDataqueryComposableSlot

func (t Type) IsDataqueryComposableSlot() bool

func (Type) IsDataqueryVariant

func (t Type) IsDataqueryVariant() bool

func (Type) IsDisjunction

func (t Type) IsDisjunction() bool

func (Type) IsDisjunctionOfRefs

func (t Type) IsDisjunctionOfRefs() bool

func (Type) IsDisjunctionOfScalars

func (t Type) IsDisjunctionOfScalars() bool

func (Type) IsEnum

func (t Type) IsEnum() bool

func (Type) IsIntersection

func (t Type) IsIntersection() bool

func (Type) IsMap

func (t Type) IsMap() bool

func (Type) IsNull

func (t Type) IsNull() bool

func (Type) IsRef

func (t Type) IsRef() bool

func (Type) IsScalar

func (t Type) IsScalar() bool

func (Type) IsStruct

func (t Type) IsStruct() bool

func (Type) IsStructGeneratedFromDisjunction

func (t Type) IsStructGeneratedFromDisjunction() bool

func (Type) IsStructOrRef

func (t Type) IsStructOrRef() bool

type TypeConstraint

type TypeConstraint struct {
	Op   Op
	Args []any
}

func (TypeConstraint) DeepCopy

func (constraint TypeConstraint) DeepCopy() TypeConstraint

type TypeOption

type TypeOption func(def *Type)

func Default

func Default(value any) TypeOption

func Discriminator

func Discriminator(discriminator string, mapping map[string]string) TypeOption

func Hints

func Hints(hints JenniesHints) TypeOption

func Nullable

func Nullable() TypeOption

func Trail

func Trail(trail string) TypeOption

func Value

func Value(value any) TypeOption

type Types

type Types []Type

func (Types) HasNullType

func (types Types) HasNullType() bool

func (Types) HasOnlyRefs

func (types Types) HasOnlyRefs() bool

func (Types) HasOnlyScalarOrArrayOrMap

func (types Types) HasOnlyScalarOrArrayOrMap() bool

func (Types) NonNullTypes

func (types Types) NonNullTypes() Types

type VisitArgumentFunc

type VisitArgumentFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder, argument Argument) (Argument, error)

type VisitAssignmentFunc

type VisitAssignmentFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder, assignment Assignment) (Assignment, error)

type VisitBuilderFunc

type VisitBuilderFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder) (Builder, error)

type VisitConstructorFunc

type VisitConstructorFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder, constructor Constructor) (Constructor, error)

type VisitOptionFunc

type VisitOptionFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder, option Option) (Option, error)

type VisitPropertyFunc

type VisitPropertyFunc func(visitor *BuilderVisitor, schemas Schemas, builder Builder, property StructField) (StructField, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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