schemadmt

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Type struct {
	Schema schema.TypedPrototype
}

Functions

func Compile added in v0.12.2

func Compile(ts *schema.TypeSystem, node *Schema) error

Compile transforms a schema in DMT form into a TypeSystem.

Note that this API is EXPERIMENTAL and will likely change. It is also unfinished and buggy.

Types

type AnyScalar

type AnyScalar struct {
	Bool   *bool
	String *string
	Bytes  *[]uint8
	Int    *int
	Float  *float64
}

type EnumRepresentation

type EnumRepresentation struct {
	EnumRepresentation_String *EnumRepresentation_String
	EnumRepresentation_Int    *EnumRepresentation_Int
}

type EnumRepresentation_Int

type EnumRepresentation_Int struct {
	Keys   []string
	Values map[string]int
}

type EnumRepresentation_String

type EnumRepresentation_String struct {
	Keys   []string
	Values map[string]string
}

type InlineDefn added in v0.12.2

type InlineDefn struct {
	TypeDefnMap  *TypeDefnMap
	TypeDefnList *TypeDefnList
	TypeDefnLink *TypeDefnLink
}

type ListRepresentation

type ListRepresentation struct {
	ListRepresentation_List *ListRepresentation_List
}

type ListRepresentation_List

type ListRepresentation_List struct {
}

type List__EnumMember added in v0.12.3

type List__EnumMember []string

type List__FieldName

type List__FieldName []string

type List__TypeName

type List__TypeName []string

type List__UnionMember added in v0.12.3

type List__UnionMember []UnionMember

type MapRepresentation

type MapRepresentation struct {
	MapRepresentation_Map         *MapRepresentation_Map
	MapRepresentation_Stringpairs *MapRepresentation_Stringpairs
	MapRepresentation_Listpairs   *MapRepresentation_Listpairs
}

type MapRepresentation_Listpairs

type MapRepresentation_Listpairs struct {
}

type MapRepresentation_Map

type MapRepresentation_Map struct {
}

type MapRepresentation_Stringpairs

type MapRepresentation_Stringpairs struct {
	InnerDelim string
	EntryDelim string
}

type Map__FieldName__StructField

type Map__FieldName__StructField struct {
	Keys   []string
	Values map[string]StructField
}

type Map__FieldName__StructRepresentation_Map_FieldDetails

type Map__FieldName__StructRepresentation_Map_FieldDetails struct {
	Keys   []string
	Values map[string]StructRepresentation_Map_FieldDetails
}

type Map__HexString__TypeName added in v0.12.3

type Map__HexString__TypeName struct {
	Keys   []string
	Values map[string]string
}

type Map__String__TypeName

type Map__String__TypeName struct {
	Keys   []string
	Values map[string]string
}

type Map__String__UnionMember added in v0.12.3

type Map__String__UnionMember struct {
	Keys   []string
	Values map[string]TypeDefn
}

type Map__TypeName__Int

type Map__TypeName__Int struct {
	Keys   []string
	Values map[string]int
}

type Map__TypeName__TypeDefn added in v0.12.3

type Map__TypeName__TypeDefn struct {
	Keys   []string
	Values map[string]TypeDefn
}

type Schema

type Schema struct {
	Types Map__TypeName__TypeDefn
}

type StructField

type StructField struct {
	Type     TypeNameOrInlineDefn
	Optional *bool
	Nullable *bool
}

type StructRepresentation

type StructRepresentation struct {
	StructRepresentation_Map         *StructRepresentation_Map
	StructRepresentation_Tuple       *StructRepresentation_Tuple
	StructRepresentation_Stringpairs *StructRepresentation_Stringpairs
	StructRepresentation_Stringjoin  *StructRepresentation_Stringjoin
	StructRepresentation_Listpairs   *StructRepresentation_Listpairs
}

type StructRepresentation_Listpairs

type StructRepresentation_Listpairs struct {
}

type StructRepresentation_Map

type StructRepresentation_Map struct {
	Fields *Map__FieldName__StructRepresentation_Map_FieldDetails
}

type StructRepresentation_Map_FieldDetails

type StructRepresentation_Map_FieldDetails struct {
	Rename   *string
	Implicit *AnyScalar
}

type StructRepresentation_Stringjoin

type StructRepresentation_Stringjoin struct {
	Join       string
	FieldOrder *List__FieldName
}

type StructRepresentation_Stringpairs

type StructRepresentation_Stringpairs struct {
	InnerDelim string
	EntryDelim string
}

type StructRepresentation_Tuple

type StructRepresentation_Tuple struct {
	FieldOrder *List__FieldName
}

type TypeDefn

type TypeDefn struct {
	TypeDefnBool   *TypeDefnBool
	TypeDefnString *TypeDefnString
	TypeDefnBytes  *TypeDefnBytes
	TypeDefnInt    *TypeDefnInt
	TypeDefnFloat  *TypeDefnFloat
	TypeDefnMap    *TypeDefnMap
	TypeDefnList   *TypeDefnList
	TypeDefnLink   *TypeDefnLink
	TypeDefnUnion  *TypeDefnUnion
	TypeDefnStruct *TypeDefnStruct
	TypeDefnEnum   *TypeDefnEnum
	TypeDefnUnit   *TypeDefnUnit
	TypeDefnAny    *TypeDefnAny
	TypeDefnCopy   *TypeDefnCopy
}

type TypeDefnAny added in v0.12.3

type TypeDefnAny struct {
}

type TypeDefnBool added in v0.12.3

type TypeDefnBool struct {
}

type TypeDefnBytes added in v0.12.3

type TypeDefnBytes struct {
}

type TypeDefnCopy added in v0.12.3

type TypeDefnCopy struct {
	FromType string
}

type TypeDefnEnum added in v0.12.3

type TypeDefnEnum struct {
	Members        List__EnumMember
	Representation EnumRepresentation
}

type TypeDefnFloat added in v0.12.3

type TypeDefnFloat struct {
}

type TypeDefnInt added in v0.12.3

type TypeDefnInt struct {
}
type TypeDefnLink struct {
	ExpectedType *string
}

type TypeDefnList added in v0.12.3

type TypeDefnList struct {
	ValueType      TypeNameOrInlineDefn
	ValueNullable  *bool
	Representation *ListRepresentation
}

type TypeDefnMap added in v0.12.3

type TypeDefnMap struct {
	KeyType        string
	ValueType      TypeNameOrInlineDefn
	ValueNullable  *bool
	Representation *MapRepresentation
}

type TypeDefnString added in v0.12.3

type TypeDefnString struct {
}

type TypeDefnStruct added in v0.12.3

type TypeDefnStruct struct {
	Fields         Map__FieldName__StructField
	Representation StructRepresentation
}

type TypeDefnUnion added in v0.12.3

type TypeDefnUnion struct {
	Members        List__UnionMember
	Representation UnionRepresentation
}

type TypeDefnUnit added in v0.12.3

type TypeDefnUnit struct {
	Representation string
}

type TypeNameOrInlineDefn

type TypeNameOrInlineDefn struct {
	TypeName   *string
	InlineDefn *InlineDefn
}

type UnionMember added in v0.12.3

type UnionMember struct {
	TypeName              *string
	UnionMemberInlineDefn *UnionMemberInlineDefn
}

type UnionMemberInlineDefn added in v0.12.3

type UnionMemberInlineDefn struct {
	TypeDefnLink *TypeDefnLink
}

type UnionRepresentation

type UnionRepresentation struct {
	UnionRepresentation_Kinded       *UnionRepresentation_Kinded
	UnionRepresentation_Keyed        *UnionRepresentation_Keyed
	UnionRepresentation_Envelope     *UnionRepresentation_Envelope
	UnionRepresentation_Inline       *UnionRepresentation_Inline
	UnionRepresentation_StringPrefix *UnionRepresentation_StringPrefix
	UnionRepresentation_BytesPrefix  *UnionRepresentation_BytesPrefix
}

type UnionRepresentation_BytesPrefix added in v0.12.3

type UnionRepresentation_BytesPrefix struct {
	Prefixes Map__HexString__TypeName
}

type UnionRepresentation_Envelope

type UnionRepresentation_Envelope struct {
	DiscriminantKey   string
	ContentKey        string
	DiscriminantTable Map__String__UnionMember
}

type UnionRepresentation_Inline

type UnionRepresentation_Inline struct {
	DiscriminantKey   string
	DiscriminantTable Map__String__TypeName
}

type UnionRepresentation_Keyed

type UnionRepresentation_Keyed struct {
	Keys   []string
	Values map[string]UnionMember
}

type UnionRepresentation_Kinded

type UnionRepresentation_Kinded struct {
	Keys   []string
	Values map[string]UnionMember
}

type UnionRepresentation_StringPrefix

type UnionRepresentation_StringPrefix struct {
	Prefixes Map__String__TypeName
}

type Unit

type Unit struct {
}

Jump to

Keyboard shortcuts

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