Documentation
¶
Index ¶
- func RegisterParser(svc Parser)
- type Alias
- func (o *Alias) Decode(decoder msgpack.Reader) error
- func (o *Alias) Encode(encoder msgpack.Writer) error
- func (v Alias) MarshalJSON() ([]byte, error)
- func (v Alias) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Alias) UnmarshalJSON(data []byte) error
- func (v *Alias) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Annotation
- func (o *Annotation) Decode(decoder msgpack.Reader) error
- func (o *Annotation) Encode(encoder msgpack.Writer) error
- func (v Annotation) MarshalJSON() ([]byte, error)
- func (v Annotation) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Annotation) UnmarshalJSON(data []byte) error
- func (v *Annotation) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Argument
- func (o *Argument) Decode(decoder msgpack.Reader) error
- func (o *Argument) Encode(encoder msgpack.Writer) error
- func (v Argument) MarshalJSON() ([]byte, error)
- func (v Argument) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Argument) UnmarshalJSON(data []byte) error
- func (v *Argument) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Converter
- type Directive
- func (o *Directive) Decode(decoder msgpack.Reader) error
- func (o *Directive) Encode(encoder msgpack.Writer) error
- func (v Directive) MarshalJSON() ([]byte, error)
- func (v Directive) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Directive) UnmarshalJSON(data []byte) error
- func (v *Directive) UnmarshalTinyJSON(l *jlexer.Lexer)
- type DirectiveLocation
- type DirectiveRequire
- func (o *DirectiveRequire) Decode(decoder msgpack.Reader) error
- func (o *DirectiveRequire) Encode(encoder msgpack.Writer) error
- func (v DirectiveRequire) MarshalJSON() ([]byte, error)
- func (v DirectiveRequire) MarshalTinyJSON(w *jwriter.Writer)
- func (v *DirectiveRequire) UnmarshalJSON(data []byte) error
- func (v *DirectiveRequire) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Enum
- type EnumValue
- func (o *EnumValue) Decode(decoder msgpack.Reader) error
- func (o *EnumValue) Encode(encoder msgpack.Writer) error
- func (v EnumValue) MarshalJSON() ([]byte, error)
- func (v EnumValue) MarshalTinyJSON(w *jwriter.Writer)
- func (v *EnumValue) UnmarshalJSON(data []byte) error
- func (v *EnumValue) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Error
- func (o *Error) Decode(decoder msgpack.Reader) error
- func (o *Error) Encode(encoder msgpack.Writer) error
- func (v Error) MarshalJSON() ([]byte, error)
- func (v Error) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Error) UnmarshalJSON(data []byte) error
- func (v *Error) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Field
- func (o *Field) Decode(decoder msgpack.Reader) error
- func (o *Field) Encode(encoder msgpack.Writer) error
- func (v Field) MarshalJSON() ([]byte, error)
- func (v Field) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Field) UnmarshalJSON(data []byte) error
- func (v *Field) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Import
- func (o *Import) Decode(decoder msgpack.Reader) error
- func (o *Import) Encode(encoder msgpack.Writer) error
- func (v Import) MarshalJSON() ([]byte, error)
- func (v Import) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Import) UnmarshalJSON(data []byte) error
- func (v *Import) UnmarshalTinyJSON(l *jlexer.Lexer)
- type ImportRef
- func (o *ImportRef) Decode(decoder msgpack.Reader) error
- func (o *ImportRef) Encode(encoder msgpack.Writer) error
- func (v ImportRef) MarshalJSON() ([]byte, error)
- func (v ImportRef) MarshalTinyJSON(w *jwriter.Writer)
- func (v *ImportRef) UnmarshalJSON(data []byte) error
- func (v *ImportRef) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Interface
- func (o *Interface) Decode(decoder msgpack.Reader) error
- func (o *Interface) Encode(encoder msgpack.Writer) error
- func (v Interface) MarshalJSON() ([]byte, error)
- func (v Interface) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Interface) UnmarshalJSON(data []byte) error
- func (v *Interface) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Kind
- type List
- type ListValue
- func (o *ListValue) Decode(decoder msgpack.Reader) error
- func (o *ListValue) Encode(encoder msgpack.Writer) error
- func (v ListValue) MarshalJSON() ([]byte, error)
- func (v ListValue) MarshalTinyJSON(w *jwriter.Writer)
- func (v *ListValue) UnmarshalJSON(data []byte) error
- func (v *ListValue) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Location
- func (o *Location) Decode(decoder msgpack.Reader) error
- func (o *Location) Encode(encoder msgpack.Writer) error
- func (v Location) MarshalJSON() ([]byte, error)
- func (v Location) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Location) UnmarshalJSON(data []byte) error
- func (v *Location) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Map
- type Named
- func (o *Named) Decode(decoder msgpack.Reader) error
- func (o *Named) Encode(encoder msgpack.Writer) error
- func (v Named) MarshalJSON() ([]byte, error)
- func (v Named) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Named) UnmarshalJSON(data []byte) error
- func (v *Named) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Namespace
- func (o *Namespace) Decode(decoder msgpack.Reader) error
- func (o *Namespace) Encode(encoder msgpack.Writer) error
- func (v Namespace) MarshalJSON() ([]byte, error)
- func (v Namespace) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Namespace) UnmarshalJSON(data []byte) error
- func (v *Namespace) UnmarshalTinyJSON(l *jlexer.Lexer)
- type ObjectField
- func (o *ObjectField) Decode(decoder msgpack.Reader) error
- func (o *ObjectField) Encode(encoder msgpack.Writer) error
- func (v ObjectField) MarshalJSON() ([]byte, error)
- func (v ObjectField) MarshalTinyJSON(w *jwriter.Writer)
- func (v *ObjectField) UnmarshalJSON(data []byte) error
- func (v *ObjectField) UnmarshalTinyJSON(l *jlexer.Lexer)
- type ObjectValue
- func (o *ObjectValue) Decode(decoder msgpack.Reader) error
- func (o *ObjectValue) Encode(encoder msgpack.Writer) error
- func (v ObjectValue) MarshalJSON() ([]byte, error)
- func (v ObjectValue) MarshalTinyJSON(w *jwriter.Writer)
- func (v *ObjectValue) UnmarshalJSON(data []byte) error
- func (v *ObjectValue) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Operation
- func (o *Operation) Decode(decoder msgpack.Reader) error
- func (o *Operation) Encode(encoder msgpack.Writer) error
- func (v Operation) MarshalJSON() ([]byte, error)
- func (v Operation) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Operation) UnmarshalJSON(data []byte) error
- func (v *Operation) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Optional
- func (o *Optional) Decode(decoder msgpack.Reader) error
- func (o *Optional) Encode(encoder msgpack.Writer) error
- func (v Optional) MarshalJSON() ([]byte, error)
- func (v Optional) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Optional) UnmarshalJSON(data []byte) error
- func (v *Optional) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Parameter
- func (o *Parameter) Decode(decoder msgpack.Reader) error
- func (o *Parameter) Encode(encoder msgpack.Writer) error
- func (v Parameter) MarshalJSON() ([]byte, error)
- func (v Parameter) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Parameter) UnmarshalJSON(data []byte) error
- func (v *Parameter) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Parser
- type ParserParseArgs
- type ParserResult
- func (o *ParserResult) Decode(decoder msgpack.Reader) error
- func (o *ParserResult) Encode(encoder msgpack.Writer) error
- func (v ParserResult) MarshalJSON() ([]byte, error)
- func (v ParserResult) MarshalTinyJSON(w *jwriter.Writer)
- func (v *ParserResult) UnmarshalJSON(data []byte) error
- func (v *ParserResult) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Reference
- func (o *Reference) Decode(decoder msgpack.Reader) error
- func (o *Reference) Encode(encoder msgpack.Writer) error
- func (v Reference) MarshalJSON() ([]byte, error)
- func (v Reference) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Reference) UnmarshalJSON(data []byte) error
- func (v *Reference) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Resolver
- type ResolverImpl
- type ResolverResolveArgs
- type Scalar
- type Stream
- func (o *Stream) Decode(decoder msgpack.Reader) error
- func (o *Stream) Encode(encoder msgpack.Writer) error
- func (v Stream) MarshalJSON() ([]byte, error)
- func (v Stream) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Stream) UnmarshalJSON(data []byte) error
- func (v *Stream) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Type
- type TypeRef
- func (o *TypeRef) Decode(decoder msgpack.Reader) error
- func (o *TypeRef) Encode(encoder msgpack.Writer) error
- func (v TypeRef) MarshalJSON() ([]byte, error)
- func (v TypeRef) MarshalTinyJSON(w *jwriter.Writer)
- func (v *TypeRef) UnmarshalJSON(data []byte) error
- func (v *TypeRef) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Union
- func (o *Union) Decode(decoder msgpack.Reader) error
- func (o *Union) Encode(encoder msgpack.Writer) error
- func (v Union) MarshalJSON() ([]byte, error)
- func (v Union) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Union) UnmarshalJSON(data []byte) error
- func (v *Union) UnmarshalTinyJSON(l *jlexer.Lexer)
- type UnionMember
- func (o *UnionMember) Decode(decoder msgpack.Reader) error
- func (o *UnionMember) Encode(encoder msgpack.Writer) error
- func (v UnionMember) MarshalJSON() ([]byte, error)
- func (v UnionMember) MarshalTinyJSON(w *jwriter.Writer)
- func (v *UnionMember) UnmarshalJSON(data []byte) error
- func (v *UnionMember) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Value
- func (o *Value) Decode(decoder msgpack.Reader) error
- func (o *Value) Encode(encoder msgpack.Writer) error
- func (v Value) MarshalJSON() ([]byte, error)
- func (v Value) MarshalTinyJSON(w *jwriter.Writer)
- func (v *Value) UnmarshalJSON(data []byte) error
- func (v *Value) UnmarshalTinyJSON(l *jlexer.Lexer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterParser ¶ added in v0.1.2
func RegisterParser(svc Parser)
Types ¶
type Alias ¶
type Alias struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Type TypeRef `json:"type" yaml:"type" msgpack:"type"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Alias types are used for cases when scalar types (like string) should be parsed our treated like a different data type in the generated code.
func DefaultAlias ¶ added in v0.1.6
func DefaultAlias() Alias
DefaultAlias returns a `Alias` struct populated with its default values.
func (Alias) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Alias) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Alias) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Alias) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Annotation ¶
type Annotation struct { Name string `json:"name" yaml:"name" msgpack:"name"` Arguments []Argument `json:"arguments,omitempty" yaml:"arguments,omitempty" msgpack:"arguments,omitempty"` }
Annotations attach additional metadata to elements. These can be used in the code generation tool to implement custom functionality for your use case. Annotations have a name and zero or many arguments.
func DefaultAnnotation ¶ added in v0.1.6
func DefaultAnnotation() Annotation
DefaultAnnotation returns a `Annotation` struct populated with its default values.
func (*Annotation) Decode ¶ added in v0.1.2
func (o *Annotation) Decode(decoder msgpack.Reader) error
func (*Annotation) Encode ¶ added in v0.1.2
func (o *Annotation) Encode(encoder msgpack.Writer) error
func (Annotation) MarshalJSON ¶
func (v Annotation) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (Annotation) MarshalTinyJSON ¶
func (v Annotation) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Annotation) UnmarshalJSON ¶
func (v *Annotation) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*Annotation) UnmarshalTinyJSON ¶
func (v *Annotation) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Argument ¶
type Argument struct { Name string `json:"name" yaml:"name" msgpack:"name"` Value Value `json:"value" yaml:"value" msgpack:"value"` }
func DefaultArgument ¶ added in v0.1.6
func DefaultArgument() Argument
DefaultArgument returns a `Argument` struct populated with its default values.
func (Argument) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Argument) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Argument) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Argument) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Directive ¶
type Directive struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty" msgpack:"parameters,omitempty"` Locations []DirectiveLocation `json:"locations" yaml:"locations" msgpack:"locations"` Require []DirectiveRequire `json:"require" yaml:"require" msgpack:"require"` }
Directives are used to ensure that an annotation's arguments match an expected format.
func DefaultDirective ¶ added in v0.1.6
func DefaultDirective() Directive
DefaultDirective returns a `Directive` struct populated with its default values.
func (Directive) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Directive) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Directive) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Directive) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type DirectiveLocation ¶
type DirectiveLocation int32
const ( DirectiveLocationNamespace DirectiveLocation = 0 DirectiveLocationAlias DirectiveLocation = 1 DirectiveLocationUnion DirectiveLocation = 2 DirectiveLocationEnum DirectiveLocation = 3 DirectiveLocationEnumValue DirectiveLocation = 4 DirectiveLocationType DirectiveLocation = 5 DirectiveLocationField DirectiveLocation = 6 DirectiveLocationInterface DirectiveLocation = 7 DirectiveLocationOperation DirectiveLocation = 8 DirectiveLocationParameter DirectiveLocation = 9 )
func (*DirectiveLocation) FromString ¶
func (e *DirectiveLocation) FromString(str string) error
func (DirectiveLocation) MarshalJSON ¶
func (e DirectiveLocation) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (DirectiveLocation) String ¶
func (e DirectiveLocation) String() string
func (*DirectiveLocation) UnmarshalJSON ¶
func (e *DirectiveLocation) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
type DirectiveRequire ¶
type DirectiveRequire struct { Directive string `json:"directive" yaml:"directive" msgpack:"directive"` Locations []DirectiveLocation `json:"locations" yaml:"locations" msgpack:"locations"` }
func DefaultDirectiveRequire ¶ added in v0.1.6
func DefaultDirectiveRequire() DirectiveRequire
DefaultDirectiveRequire returns a `DirectiveRequire` struct populated with its default values.
func (*DirectiveRequire) Decode ¶ added in v0.1.2
func (o *DirectiveRequire) Decode(decoder msgpack.Reader) error
func (*DirectiveRequire) Encode ¶ added in v0.1.2
func (o *DirectiveRequire) Encode(encoder msgpack.Writer) error
func (DirectiveRequire) MarshalJSON ¶
func (v DirectiveRequire) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (DirectiveRequire) MarshalTinyJSON ¶
func (v DirectiveRequire) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*DirectiveRequire) UnmarshalJSON ¶
func (v *DirectiveRequire) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*DirectiveRequire) UnmarshalTinyJSON ¶
func (v *DirectiveRequire) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Enum ¶
type Enum struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Values []EnumValue `json:"values" yaml:"values" msgpack:"values"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Enumerations (or enums) are a type that is constrained to a finite set of allowed values.
func DefaultEnum ¶ added in v0.1.6
func DefaultEnum() Enum
DefaultEnum returns a `Enum` struct populated with its default values.
func (Enum) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Enum) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Enum) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Enum) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type EnumValue ¶
type EnumValue struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Index uint64 `json:"index" yaml:"index" msgpack:"index"` Display *string `json:"display,omitempty" yaml:"display,omitempty" msgpack:"display,omitempty"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
func DefaultEnumValue ¶ added in v0.1.6
func DefaultEnumValue() EnumValue
DefaultEnumValue returns a `EnumValue` struct populated with its default values.
func (EnumValue) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (EnumValue) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*EnumValue) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*EnumValue) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Error ¶ added in v0.1.2
type Error struct { Message string `json:"message" yaml:"message" msgpack:"message"` Positions []uint32 `json:"positions" yaml:"positions" msgpack:"positions"` Locations []Location `json:"locations" yaml:"locations" msgpack:"locations"` }
func DefaultError ¶ added in v0.1.6
func DefaultError() Error
DefaultError returns a `Error` struct populated with its default values.
func (Error) MarshalJSON ¶ added in v0.1.2
MarshalJSON supports json.Marshaler interface
func (Error) MarshalTinyJSON ¶ added in v0.1.2
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Error) UnmarshalJSON ¶ added in v0.1.2
UnmarshalJSON supports json.Unmarshaler interface
func (*Error) UnmarshalTinyJSON ¶ added in v0.1.2
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Field ¶
type Field struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Type TypeRef `json:"type" yaml:"type" msgpack:"type"` DefaultValue *Value `json:"defaultValue,omitempty" yaml:"defaultValue,omitempty" msgpack:"defaultValue,omitempty"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
func DefaultField ¶ added in v0.1.6
func DefaultField() Field
DefaultField returns a `Field` struct populated with its default values.
func (Field) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Field) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Field) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Field) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Import ¶
type Import struct { Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` All bool `json:"all" yaml:"all" msgpack:"all"` Names []ImportRef `json:"names,omitempty" yaml:"names,omitempty" msgpack:"names,omitempty"` From string `json:"from" yaml:"from" msgpack:"from"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Apex can integrate external definitions using the import keyword.
func DefaultImport ¶ added in v0.1.6
func DefaultImport() Import
DefaultImport returns a `Import` struct populated with its default values.
func (Import) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Import) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Import) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Import) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type ImportRef ¶
type ImportRef struct { Name string `json:"name" yaml:"name" msgpack:"name"` As *string `json:"as,omitempty" yaml:"as,omitempty" msgpack:"as,omitempty"` }
func DefaultImportRef ¶ added in v0.1.6
func DefaultImportRef() ImportRef
DefaultImportRef returns a `ImportRef` struct populated with its default values.
func (ImportRef) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (ImportRef) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*ImportRef) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*ImportRef) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Interface ¶
type Interface struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Operations []Operation `json:"operations" yaml:"operations" msgpack:"operations"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Interfaces are conceptual groups of operations that allow the developer to divide communication into multiple components. Typically, interfaces are named according to their purpose.
func DefaultInterface ¶ added in v0.1.6
func DefaultInterface() Interface
DefaultInterface returns a `Interface` struct populated with its default values.
func (Interface) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Interface) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Interface) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Interface) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Kind ¶
type Kind int32
func (*Kind) FromString ¶
func (Kind) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Kind) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
type List ¶
type List struct {
Type TypeRef `json:"type" yaml:"type" msgpack:"type"`
}
func DefaultList ¶ added in v0.1.6
func DefaultList() List
DefaultList returns a `List` struct populated with its default values.
func (List) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (List) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*List) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*List) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type ListValue ¶
type ListValue struct {
Values []Value `json:"values" yaml:"values" msgpack:"values"`
}
func DefaultListValue ¶ added in v0.1.6
func DefaultListValue() ListValue
DefaultListValue returns a `ListValue` struct populated with its default values.
func (ListValue) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (ListValue) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*ListValue) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*ListValue) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Location ¶ added in v0.1.2
type Location struct { Line uint32 `json:"line" yaml:"line" msgpack:"line"` Column uint32 `json:"column" yaml:"column" msgpack:"column"` }
func DefaultLocation ¶ added in v0.1.6
func DefaultLocation() Location
DefaultLocation returns a `Location` struct populated with its default values.
func (Location) MarshalJSON ¶ added in v0.1.2
MarshalJSON supports json.Marshaler interface
func (Location) MarshalTinyJSON ¶ added in v0.1.2
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Location) UnmarshalJSON ¶ added in v0.1.2
UnmarshalJSON supports json.Unmarshaler interface
func (*Location) UnmarshalTinyJSON ¶ added in v0.1.2
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Map ¶
type Map struct { KeyType TypeRef `json:"keyType" yaml:"keyType" msgpack:"keyType"` ValueType TypeRef `json:"valueType" yaml:"valueType" msgpack:"valueType"` }
func DefaultMap ¶ added in v0.1.6
func DefaultMap() Map
DefaultMap returns a `Map` struct populated with its default values.
func (Map) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Map) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Map) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Map) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Named ¶
type Named struct { Kind Kind `json:"kind" yaml:"kind" msgpack:"kind"` Name string `json:"name" yaml:"name" msgpack:"name"` }
func DefaultNamed ¶ added in v0.1.6
func DefaultNamed() Named
DefaultNamed returns a `Named` struct populated with its default values.
func (Named) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Named) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Named) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Named) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Namespace ¶
type Namespace struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` Imports []Import `json:"imports,omitempty" yaml:"imports,omitempty" msgpack:"imports,omitempty"` Directives []Directive `json:"directives,omitempty" yaml:"directives,omitempty" msgpack:"directives,omitempty"` Aliases []Alias `json:"aliases,omitempty" yaml:"aliases,omitempty" msgpack:"aliases,omitempty"` Functions []Operation `json:"functions,omitempty" yaml:"functions,omitempty" msgpack:"functions,omitempty"` Interfaces []Interface `json:"interfaces,omitempty" yaml:"interfaces,omitempty" msgpack:"interfaces,omitempty"` Types []Type `json:"types,omitempty" yaml:"types,omitempty" msgpack:"types,omitempty"` Unions []Union `json:"unions,omitempty" yaml:"unions,omitempty" msgpack:"unions,omitempty"` }
Namespace encapsulates is used to identify and refer to elements contained in the Apex specification.
func DefaultNamespace ¶ added in v0.1.6
func DefaultNamespace() Namespace
DefaultNamespace returns a `Namespace` struct populated with its default values.
func (Namespace) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Namespace) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Namespace) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Namespace) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type ObjectField ¶
type ObjectField struct { Name string `json:"name" yaml:"name" msgpack:"name"` Value Value `json:"value" yaml:"value" msgpack:"value"` }
func DefaultObjectField ¶ added in v0.1.6
func DefaultObjectField() ObjectField
DefaultObjectField returns a `ObjectField` struct populated with its default values.
func (*ObjectField) Decode ¶ added in v0.1.2
func (o *ObjectField) Decode(decoder msgpack.Reader) error
func (*ObjectField) Encode ¶ added in v0.1.2
func (o *ObjectField) Encode(encoder msgpack.Writer) error
func (ObjectField) MarshalJSON ¶
func (v ObjectField) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (ObjectField) MarshalTinyJSON ¶
func (v ObjectField) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*ObjectField) UnmarshalJSON ¶
func (v *ObjectField) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*ObjectField) UnmarshalTinyJSON ¶
func (v *ObjectField) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type ObjectValue ¶
type ObjectValue struct {
Fields []ObjectField `json:"fields" yaml:"fields" msgpack:"fields"`
}
func DefaultObjectValue ¶ added in v0.1.6
func DefaultObjectValue() ObjectValue
DefaultObjectValue returns a `ObjectValue` struct populated with its default values.
func (*ObjectValue) Decode ¶ added in v0.1.2
func (o *ObjectValue) Decode(decoder msgpack.Reader) error
func (*ObjectValue) Encode ¶ added in v0.1.2
func (o *ObjectValue) Encode(encoder msgpack.Writer) error
func (ObjectValue) MarshalJSON ¶
func (v ObjectValue) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (ObjectValue) MarshalTinyJSON ¶
func (v ObjectValue) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*ObjectValue) UnmarshalJSON ¶
func (v *ObjectValue) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*ObjectValue) UnmarshalTinyJSON ¶
func (v *ObjectValue) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Operation ¶
type Operation struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty" msgpack:"parameters,omitempty"` Unary *Parameter `json:"unary,omitempty" yaml:"unary,omitempty" msgpack:"unary,omitempty"` Returns *TypeRef `json:"returns,omitempty" yaml:"returns,omitempty" msgpack:"returns,omitempty"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
func DefaultOperation ¶ added in v0.1.6
func DefaultOperation() Operation
DefaultOperation returns a `Operation` struct populated with its default values.
func (Operation) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Operation) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Operation) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Optional ¶
type Optional struct {
Type TypeRef `json:"type" yaml:"type" msgpack:"type"`
}
func DefaultOptional ¶ added in v0.1.6
func DefaultOptional() Optional
DefaultOptional returns a `Optional` struct populated with its default values.
func (Optional) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Optional) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Optional) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Optional) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Parameter ¶
type Parameter struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Type TypeRef `json:"type" yaml:"type" msgpack:"type"` DefaultValue *Value `json:"defaultValue,omitempty" yaml:"defaultValue,omitempty" msgpack:"defaultValue,omitempty"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
func DefaultParameter ¶ added in v0.1.6
func DefaultParameter() Parameter
DefaultParameter returns a `Parameter` struct populated with its default values.
func (Parameter) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Parameter) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Parameter) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Parameter) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Parser ¶ added in v0.1.2
type Parser interface {
Parse(ctx context.Context, source string) (*ParserResult, error)
}
type ParserParseArgs ¶ added in v0.1.4
type ParserParseArgs struct {
Source string `json:"source" yaml:"source" msgpack:"source"`
}
func (*ParserParseArgs) Decode ¶ added in v0.1.4
func (o *ParserParseArgs) Decode(decoder msgpack.Reader) error
func (*ParserParseArgs) Encode ¶ added in v0.1.4
func (o *ParserParseArgs) Encode(encoder msgpack.Writer) error
type ParserResult ¶ added in v0.1.2
type ParserResult struct { Namespace *Namespace `json:"namespace,omitempty" yaml:"namespace,omitempty" msgpack:"namespace,omitempty"` Errors []Error `json:"errors,omitempty" yaml:"errors,omitempty" msgpack:"errors,omitempty"` }
func DefaultParserResult ¶ added in v0.1.6
func DefaultParserResult() ParserResult
DefaultParserResult returns a `ParserResult` struct populated with its default values.
func (*ParserResult) Decode ¶ added in v0.1.2
func (o *ParserResult) Decode(decoder msgpack.Reader) error
func (*ParserResult) Encode ¶ added in v0.1.2
func (o *ParserResult) Encode(encoder msgpack.Writer) error
func (ParserResult) MarshalJSON ¶ added in v0.1.2
func (v ParserResult) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (ParserResult) MarshalTinyJSON ¶ added in v0.1.2
func (v ParserResult) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*ParserResult) UnmarshalJSON ¶ added in v0.1.2
func (v *ParserResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*ParserResult) UnmarshalTinyJSON ¶ added in v0.1.2
func (v *ParserResult) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Reference ¶
type Reference struct {
Name string `json:"name" yaml:"name" msgpack:"name"`
}
func DefaultReference ¶ added in v0.1.6
func DefaultReference() Reference
DefaultReference returns a `Reference` struct populated with its default values.
func (Reference) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Reference) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Reference) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Reference) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type ResolverImpl ¶ added in v0.1.2
type ResolverImpl struct {
// contains filtered or unexported fields
}
func NewResolver ¶ added in v0.1.2
func NewResolver(binding ...string) *ResolverImpl
type ResolverResolveArgs ¶ added in v0.1.4
type ResolverResolveArgs struct { Location string `json:"location" yaml:"location" msgpack:"location"` From string `json:"from" yaml:"from" msgpack:"from"` }
func (*ResolverResolveArgs) Decode ¶ added in v0.1.4
func (o *ResolverResolveArgs) Decode(decoder msgpack.Reader) error
func (*ResolverResolveArgs) Encode ¶ added in v0.1.4
func (o *ResolverResolveArgs) Encode(encoder msgpack.Writer) error
type Scalar ¶
type Scalar int32
const ( ScalarString Scalar = 1 ScalarBool Scalar = 2 ScalarI8 Scalar = 3 ScalarI16 Scalar = 4 ScalarI32 Scalar = 5 ScalarI64 Scalar = 6 ScalarU8 Scalar = 7 ScalarU16 Scalar = 8 ScalarU32 Scalar = 9 ScalarU64 Scalar = 10 ScalarF32 Scalar = 11 ScalarF64 Scalar = 12 ScalarBytes Scalar = 13 ScalarDatetime Scalar = 14 ScalarAny Scalar = 15 ScalarRaw Scalar = 16 )
func (*Scalar) FromString ¶
func (Scalar) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Scalar) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
type Stream ¶
type Stream struct {
Type TypeRef `json:"type" yaml:"type" msgpack:"type"`
}
func DefaultStream ¶ added in v0.1.6
func DefaultStream() Stream
DefaultStream returns a `Stream` struct populated with its default values.
func (Stream) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Stream) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Stream) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Stream) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Type ¶
type Type struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Fields []Field `json:"fields" yaml:"fields" msgpack:"fields"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Types are the most basic component of an Apex specification. They represent data structures with fields. Types are defined in a language-agnostic way. This means that complex features like nested structures, inheritance, and generics/templates are omitted by design.
func DefaultType ¶ added in v0.1.6
func DefaultType() Type
DefaultType returns a `Type` struct populated with its default values.
func (Type) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Type) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Type) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Type) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type TypeRef ¶
type TypeRef struct { Scalar *Scalar `json:"Scalar,omitempty" yaml:"Scalar,omitempty" msgpack:"Scalar,omitempty"` Named *Named `json:"Named,omitempty" yaml:"Named,omitempty" msgpack:"Named,omitempty"` List *List `json:"List,omitempty" yaml:"List,omitempty" msgpack:"List,omitempty"` Map *Map `json:"Map,omitempty" yaml:"Map,omitempty" msgpack:"Map,omitempty"` Stream *Stream `json:"Stream,omitempty" yaml:"Stream,omitempty" msgpack:"Stream,omitempty"` Optional *Optional `json:"Optional,omitempty" yaml:"Optional,omitempty" msgpack:"Optional,omitempty"` }
func (TypeRef) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (TypeRef) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*TypeRef) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*TypeRef) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Union ¶
type Union struct { Name string `json:"name" yaml:"name" msgpack:"name"` Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Members []UnionMember `json:"members" yaml:"members" msgpack:"members"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
Unions types denote that a type can have one of several representations.
func DefaultUnion ¶ added in v0.1.6
func DefaultUnion() Union
DefaultUnion returns a `Union` struct populated with its default values.
func (Union) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Union) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Union) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Union) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type UnionMember ¶ added in v0.1.6
type UnionMember struct { Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` Type TypeRef `json:"type" yaml:"type" msgpack:"type"` Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` }
func DefaultUnionMember ¶ added in v0.1.6
func DefaultUnionMember() UnionMember
DefaultUnionMember returns a `UnionMember` struct populated with its default values.
func (*UnionMember) Decode ¶ added in v0.1.6
func (o *UnionMember) Decode(decoder msgpack.Reader) error
func (*UnionMember) Encode ¶ added in v0.1.6
func (o *UnionMember) Encode(encoder msgpack.Writer) error
func (UnionMember) MarshalJSON ¶ added in v0.1.6
func (v UnionMember) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (UnionMember) MarshalTinyJSON ¶ added in v0.1.6
func (v UnionMember) MarshalTinyJSON(w *jwriter.Writer)
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*UnionMember) UnmarshalJSON ¶ added in v0.1.6
func (v *UnionMember) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*UnionMember) UnmarshalTinyJSON ¶ added in v0.1.6
func (v *UnionMember) UnmarshalTinyJSON(l *jlexer.Lexer)
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Value ¶
type Value struct { Bool *bool `json:"bool,omitempty" yaml:"bool,omitempty" msgpack:"bool,omitempty"` String *string `json:"string,omitempty" yaml:"string,omitempty" msgpack:"string,omitempty"` I64 *int64 `json:"i64,omitempty" yaml:"i64,omitempty" msgpack:"i64,omitempty"` F64 *float64 `json:"f64,omitempty" yaml:"f64,omitempty" msgpack:"f64,omitempty"` Reference *Reference `json:"Reference,omitempty" yaml:"Reference,omitempty" msgpack:"Reference,omitempty"` ListValue *ListValue `json:"ListValue,omitempty" yaml:"ListValue,omitempty" msgpack:"ListValue,omitempty"` ObjectValue *ObjectValue `json:"ObjectValue,omitempty" yaml:"ObjectValue,omitempty" msgpack:"ObjectValue,omitempty"` }
func (Value) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Value) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Value) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Value) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface