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 (n *Alias) Namespace() string
- 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 (n *Annotation) Namespace() string
- 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 (n *Argument) Namespace() string
- 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 (n *Directive) Namespace() string
- 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 (n *DirectiveRequire) Namespace() string
- func (v *DirectiveRequire) UnmarshalJSON(data []byte) error
- func (v *DirectiveRequire) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Enum
- func (o *Enum) Decode(decoder msgpack.Reader) error
- func (o *Enum) Encode(encoder msgpack.Writer) error
- func (v Enum) MarshalJSON() ([]byte, error)
- func (v Enum) MarshalTinyJSON(w *jwriter.Writer)
- func (n *Enum) Namespace() string
- func (v *Enum) UnmarshalJSON(data []byte) error
- func (v *Enum) UnmarshalTinyJSON(l *jlexer.Lexer)
- 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 (n *EnumValue) Namespace() string
- 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 (n *Error) Namespace() string
- 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 (n *Field) Namespace() string
- 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 (n *Import) Namespace() string
- 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 (n *ImportRef) Namespace() string
- 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 (n *Interface) Namespace() string
- func (v *Interface) UnmarshalJSON(data []byte) error
- func (v *Interface) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Kind
- type List
- func (o *List) Decode(decoder msgpack.Reader) error
- func (o *List) Encode(encoder msgpack.Writer) error
- func (v List) MarshalJSON() ([]byte, error)
- func (v List) MarshalTinyJSON(w *jwriter.Writer)
- func (n *List) Namespace() string
- func (v *List) UnmarshalJSON(data []byte) error
- func (v *List) UnmarshalTinyJSON(l *jlexer.Lexer)
- 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 (n *ListValue) Namespace() string
- 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 (n *Location) Namespace() string
- func (v *Location) UnmarshalJSON(data []byte) error
- func (v *Location) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Map
- func (o *Map) Decode(decoder msgpack.Reader) error
- func (o *Map) Encode(encoder msgpack.Writer) error
- func (v Map) MarshalJSON() ([]byte, error)
- func (v Map) MarshalTinyJSON(w *jwriter.Writer)
- func (n *Map) Namespace() string
- func (v *Map) UnmarshalJSON(data []byte) error
- func (v *Map) UnmarshalTinyJSON(l *jlexer.Lexer)
- 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 (n *Named) Namespace() string
- 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 (n *Namespace) Namespace() string
- 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 (n *ObjectField) Namespace() string
- 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 (n *ObjectValue) Namespace() string
- 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 (n *Operation) Namespace() string
- 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 (n *Optional) Namespace() string
- 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 (n *Parameter) Namespace() string
- func (v *Parameter) UnmarshalJSON(data []byte) error
- func (v *Parameter) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Parser
- 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 (n *ParserResult) Namespace() string
- 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 (n *Reference) Namespace() string
- func (v *Reference) UnmarshalJSON(data []byte) error
- func (v *Reference) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Resolver
- type ResolverImpl
- 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 (n *Stream) Namespace() string
- func (v *Stream) UnmarshalJSON(data []byte) error
- func (v *Stream) UnmarshalTinyJSON(l *jlexer.Lexer)
- type Type
- func (o *Type) Decode(decoder msgpack.Reader) error
- func (o *Type) Encode(encoder msgpack.Writer) error
- func (v Type) MarshalJSON() ([]byte, error)
- func (v Type) MarshalTinyJSON(w *jwriter.Writer)
- func (n *Type) Namespace() string
- func (v *Type) UnmarshalJSON(data []byte) error
- func (v *Type) UnmarshalTinyJSON(l *jlexer.Lexer)
- 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 (n *Union) Namespace() string
- func (v *Union) UnmarshalJSON(data []byte) error
- func (v *Union) 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"`
// contains filtered or unexported fields
}
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 (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"`
// contains filtered or unexported fields
}
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 (*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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
Directives are used to ensure that an annotation's arguments match an expected format.
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) (ok bool)
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) Type ¶
func (e DirectiveLocation) Type() 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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
Enumerations (or enums) are a type that is constrained to a finite set of allowed 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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
Apex can integrate external definitions using the import keyword.
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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 (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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
Namespace encapsulates is used to identify and refer to elements contained in the Apex specification.
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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 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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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 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"`
// contains filtered or unexported fields
}
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"`
// contains filtered or unexported fields
}
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 (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"`
Types []TypeRef `json:"types" yaml:"types" msgpack:"types"`
Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"`
// contains filtered or unexported fields
}
Unions types denote that a type can have one of several representations.
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 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