Documentation ¶
Overview ¶
gogen-avro's internal representation of Avro schemas, and templates for code generation
Index ¶
- Constants
- type ArrayField
- func (s *ArrayField) AddStruct(p *generator.Package, container bool) error
- func (s *ArrayField) ConstructorMethod() string
- func (s *ArrayField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *ArrayField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *ArrayField) GoType() string
- func (s *ArrayField) IsReadableBy(f AvroType) bool
- func (s *ArrayField) ItemConstructable() string
- func (s *ArrayField) ItemType() AvroType
- func (s *ArrayField) Name() string
- func (s *ArrayField) ResolveReferences(n *Namespace) error
- func (s *ArrayField) SerializerMethod() string
- func (s *ArrayField) SimpleName() string
- func (s *ArrayField) WrapperType() string
- type AvroType
- type BoolField
- type BytesField
- type Constructable
- type Definition
- type DoubleField
- type EnumDefinition
- func (e *EnumDefinition) AddStruct(p *generator.Package, _ bool) error
- func (e *EnumDefinition) Aliases() []QualifiedName
- func (e *EnumDefinition) AvroName() QualifiedName
- func (s *EnumDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *EnumDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (e *EnumDefinition) Doc() string
- func (e *EnumDefinition) FromStringMethod() string
- func (e *EnumDefinition) GoType() string
- func (s *EnumDefinition) IsReadableBy(d Definition) bool
- func (e *EnumDefinition) Name() string
- func (s *EnumDefinition) ResolveReferences(n *Namespace) error
- func (e *EnumDefinition) SerializerMethod() string
- func (e *EnumDefinition) SimpleName() string
- func (e *EnumDefinition) SymbolName(symbol string) string
- func (e *EnumDefinition) Symbols() []string
- func (s *EnumDefinition) WrapperType() string
- type Field
- func (f *Field) Default() interface{}
- func (f *Field) Definition(scope map[QualifiedName]interface{}) (map[string]interface{}, error)
- func (f *Field) Doc() string
- func (f *Field) GoName() string
- func (f *Field) HasDefault() bool
- func (f *Field) Index() int
- func (f *Field) IsSameField(otherField *Field) bool
- func (f *Field) Name() string
- func (f *Field) NameMatchesAliases(name string) bool
- func (f *Field) SimpleName() string
- func (f *Field) Tags() string
- func (f *Field) Type() AvroType
- type FixedDefinition
- func (s *FixedDefinition) AddStruct(p *generator.Package, _ bool) error
- func (s *FixedDefinition) Aliases() []QualifiedName
- func (s *FixedDefinition) AvroName() QualifiedName
- func (s *FixedDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *FixedDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *FixedDefinition) GoType() string
- func (s *FixedDefinition) IsReadableBy(d Definition) bool
- func (s *FixedDefinition) Name() string
- func (s *FixedDefinition) ResolveReferences(n *Namespace) error
- func (s *FixedDefinition) SerializerMethod() string
- func (s *FixedDefinition) SimpleName() string
- func (s *FixedDefinition) SizeBytes() int
- func (s *FixedDefinition) WrapperType() string
- type FloatField
- type IntField
- type LongField
- type MapField
- func (s *MapField) AddStruct(p *generator.Package, containers bool) error
- func (s *MapField) ConstructorMethod() string
- func (s *MapField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *MapField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *MapField) GoType() string
- func (s *MapField) IsReadableBy(f AvroType) bool
- func (s *MapField) ItemConstructable() string
- func (s *MapField) ItemType() AvroType
- func (s *MapField) Name() string
- func (s *MapField) ResolveReferences(n *Namespace) error
- func (s *MapField) SerializerMethod() string
- func (s *MapField) SimpleName() string
- func (s *MapField) WrapperType() string
- type Namespace
- type NullField
- type PrimitiveField
- func (s *PrimitiveField) AddStruct(p *generator.Package, _ bool) error
- func (s *PrimitiveField) Definition(_ map[QualifiedName]interface{}) (interface{}, error)
- func (s *PrimitiveField) GoType() string
- func (s *PrimitiveField) Name() string
- func (s *PrimitiveField) ResolveReferences(n *Namespace) error
- func (s *PrimitiveField) SerializerMethod() string
- func (s *PrimitiveField) SimpleName() string
- type QualifiedName
- type RecordDefinition
- func (r *RecordDefinition) AddStruct(p *generator.Package, containers bool) error
- func (r *RecordDefinition) Aliases() []QualifiedName
- func (r *RecordDefinition) AvroName() QualifiedName
- func (r *RecordDefinition) ConstructableForField(f *Field) string
- func (r *RecordDefinition) ConstructorMethod() string
- func (r *RecordDefinition) DefaultForField(f *Field) (string, error)
- func (r *RecordDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (r *RecordDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *RecordDefinition) Doc() string
- func (r *RecordDefinition) FieldByName(field string) *Field
- func (r *RecordDefinition) Fields() []*Field
- func (r *RecordDefinition) GetReaderField(writerField *Field) *Field
- func (r *RecordDefinition) GoType() string
- func (s *RecordDefinition) IsReadableBy(d Definition) bool
- func (r *RecordDefinition) Name() string
- func (r *RecordDefinition) NewWriterMethod() string
- func (r *RecordDefinition) RecordReaderTypeName() string
- func (r *RecordDefinition) ResolveReferences(n *Namespace) error
- func (s *RecordDefinition) Schema() (string, error)
- func (r *RecordDefinition) SerializerMethod() string
- func (r *RecordDefinition) SimpleName() string
- func (s *RecordDefinition) WrapperType() string
- type Reference
- func (s *Reference) AddStruct(p *generator.Package, containers bool) error
- func (s *Reference) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *Reference) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *Reference) GoType() string
- func (s *Reference) IsReadableBy(f AvroType) bool
- func (s *Reference) Name() string
- func (s *Reference) ResolveReferences(n *Namespace) error
- func (s *Reference) SerializerMethod() string
- func (s *Reference) SimpleName() string
- func (s *Reference) WrapperType() string
- type RequiredMapKeyError
- type Schema
- type SchemaError
- type StringField
- type UnionField
- func (s *UnionField) AddStruct(p *generator.Package, containers bool) error
- func (s *UnionField) AvroTypes() []AvroType
- func (s *UnionField) ConstructorMethod() string
- func (s *UnionField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
- func (s *UnionField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
- func (s *UnionField) Equals(reader *UnionField) bool
- func (s *UnionField) GoType() string
- func (s *UnionField) IsReadableBy(f AvroType) bool
- func (s *UnionField) ItemConstructor(f AvroType) string
- func (s *UnionField) ItemName(item AvroType) string
- func (s *UnionField) ItemTypes() []AvroType
- func (s *UnionField) Name() string
- func (s *UnionField) ResolveReferences(n *Namespace) error
- func (s *UnionField) SerializerMethod() string
- func (s *UnionField) SimpleName() string
- func (s *UnionField) UnionEnumType() string
- func (s *UnionField) WrapperType() string
- type WrongMapValueTypeError
Constants ¶
const UTIL_FILE = "primitive.go"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayField ¶
type ArrayField struct {
// contains filtered or unexported fields
}
func NewArrayField ¶
func NewArrayField(itemType AvroType, definition map[string]interface{}) *ArrayField
func (*ArrayField) AddStruct ¶
func (s *ArrayField) AddStruct(p *generator.Package, container bool) error
func (*ArrayField) ConstructorMethod ¶
func (s *ArrayField) ConstructorMethod() string
func (*ArrayField) DefaultValue ¶
func (s *ArrayField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*ArrayField) Definition ¶
func (s *ArrayField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*ArrayField) GoType ¶
func (s *ArrayField) GoType() string
func (*ArrayField) IsReadableBy ¶
func (s *ArrayField) IsReadableBy(f AvroType) bool
func (*ArrayField) ItemConstructable ¶
func (s *ArrayField) ItemConstructable() string
func (*ArrayField) ItemType ¶
func (s *ArrayField) ItemType() AvroType
func (*ArrayField) Name ¶
func (s *ArrayField) Name() string
func (*ArrayField) ResolveReferences ¶
func (s *ArrayField) ResolveReferences(n *Namespace) error
func (*ArrayField) SerializerMethod ¶
func (s *ArrayField) SerializerMethod() string
func (*ArrayField) SimpleName ¶
func (s *ArrayField) SimpleName() string
func (*ArrayField) WrapperType ¶
func (s *ArrayField) WrapperType() string
type AvroType ¶
type AvroType interface { Name() string SimpleName() string GoType() string // The name of the method which writes this field onto the wire SerializerMethod() string // Add the imports and struct for the definition of this type to the generator.Package AddStruct(*generator.Package, bool) error // Attempt to resolve references to named structs, enums or fixed fields ResolveReferences(*Namespace) error Definition(scope map[QualifiedName]interface{}) (interface{}, error) DefaultValue(lvalue string, rvalue interface{}) (string, error) WrapperType() string IsReadableBy(f AvroType) bool }
type BoolField ¶
type BoolField struct {
PrimitiveField
}
func NewBoolField ¶
func NewBoolField(definition interface{}) *BoolField
func (*BoolField) DefaultValue ¶
func (*BoolField) IsReadableBy ¶
func (*BoolField) WrapperType ¶
type BytesField ¶
type BytesField struct {
PrimitiveField
}
func NewBytesField ¶
func NewBytesField(definition interface{}) *BytesField
func (*BytesField) DefaultValue ¶
func (s *BytesField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*BytesField) IsReadableBy ¶
func (s *BytesField) IsReadableBy(f AvroType) bool
func (*BytesField) WrapperType ¶
func (s *BytesField) WrapperType() string
type Constructable ¶
type Constructable interface {
ConstructorMethod() string
}
type Definition ¶
type Definition interface { AvroName() QualifiedName Aliases() []QualifiedName // A user-friendly name that can be built into a Go string (for unions, mostly) Name() string SimpleName() string GoType() string SerializerMethod() string // Add the imports and struct for the definition of this type to the generator.Package AddStruct(*generator.Package, bool) error // Resolve references to user-defined types ResolveReferences(*Namespace) error // A JSON object defining this object, for writing the schema back out Definition(scope map[QualifiedName]interface{}) (interface{}, error) DefaultValue(lvalue string, rvalue interface{}) (string, error) IsReadableBy(f Definition) bool WrapperType() string }
type DoubleField ¶
type DoubleField struct {
PrimitiveField
}
func NewDoubleField ¶
func NewDoubleField(definition interface{}) *DoubleField
func (*DoubleField) DefaultValue ¶
func (s *DoubleField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*DoubleField) IsReadableBy ¶
func (s *DoubleField) IsReadableBy(f AvroType) bool
func (*DoubleField) WrapperType ¶
func (s *DoubleField) WrapperType() string
type EnumDefinition ¶
type EnumDefinition struct {
// contains filtered or unexported fields
}
func NewEnumDefinition ¶
func NewEnumDefinition(name QualifiedName, aliases []QualifiedName, symbols []string, doc string, definition map[string]interface{}) *EnumDefinition
func (*EnumDefinition) AddStruct ¶
func (e *EnumDefinition) AddStruct(p *generator.Package, _ bool) error
func (*EnumDefinition) Aliases ¶
func (e *EnumDefinition) Aliases() []QualifiedName
func (*EnumDefinition) AvroName ¶
func (e *EnumDefinition) AvroName() QualifiedName
func (*EnumDefinition) DefaultValue ¶
func (s *EnumDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*EnumDefinition) Definition ¶
func (s *EnumDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*EnumDefinition) Doc ¶
func (e *EnumDefinition) Doc() string
func (*EnumDefinition) FromStringMethod ¶
func (e *EnumDefinition) FromStringMethod() string
func (*EnumDefinition) GoType ¶
func (e *EnumDefinition) GoType() string
func (*EnumDefinition) IsReadableBy ¶
func (s *EnumDefinition) IsReadableBy(d Definition) bool
func (*EnumDefinition) Name ¶
func (e *EnumDefinition) Name() string
func (*EnumDefinition) ResolveReferences ¶
func (s *EnumDefinition) ResolveReferences(n *Namespace) error
func (*EnumDefinition) SerializerMethod ¶
func (e *EnumDefinition) SerializerMethod() string
func (*EnumDefinition) SimpleName ¶
func (e *EnumDefinition) SimpleName() string
func (*EnumDefinition) SymbolName ¶
func (e *EnumDefinition) SymbolName(symbol string) string
func (*EnumDefinition) Symbols ¶
func (e *EnumDefinition) Symbols() []string
func (*EnumDefinition) WrapperType ¶
func (s *EnumDefinition) WrapperType() string
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (*Field) Definition ¶
func (f *Field) Definition(scope map[QualifiedName]interface{}) (map[string]interface{}, error)
func (*Field) HasDefault ¶
func (*Field) IsSameField ¶
IsSameField checks whether two fields have the same name or any of their aliases are the same, in which case they're the same for purposes of schema evolution
func (*Field) NameMatchesAliases ¶
func (*Field) SimpleName ¶
type FixedDefinition ¶
type FixedDefinition struct {
// contains filtered or unexported fields
}
func NewFixedDefinition ¶
func NewFixedDefinition(name QualifiedName, aliases []QualifiedName, sizeBytes int, definition map[string]interface{}) *FixedDefinition
func (*FixedDefinition) AddStruct ¶
func (s *FixedDefinition) AddStruct(p *generator.Package, _ bool) error
func (*FixedDefinition) Aliases ¶
func (s *FixedDefinition) Aliases() []QualifiedName
func (*FixedDefinition) AvroName ¶
func (s *FixedDefinition) AvroName() QualifiedName
func (*FixedDefinition) DefaultValue ¶
func (s *FixedDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*FixedDefinition) Definition ¶
func (s *FixedDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*FixedDefinition) GoType ¶
func (s *FixedDefinition) GoType() string
func (*FixedDefinition) IsReadableBy ¶
func (s *FixedDefinition) IsReadableBy(d Definition) bool
func (*FixedDefinition) Name ¶
func (s *FixedDefinition) Name() string
func (*FixedDefinition) ResolveReferences ¶
func (s *FixedDefinition) ResolveReferences(n *Namespace) error
func (*FixedDefinition) SerializerMethod ¶
func (s *FixedDefinition) SerializerMethod() string
func (*FixedDefinition) SimpleName ¶
func (s *FixedDefinition) SimpleName() string
func (*FixedDefinition) SizeBytes ¶
func (s *FixedDefinition) SizeBytes() int
func (*FixedDefinition) WrapperType ¶
func (s *FixedDefinition) WrapperType() string
type FloatField ¶
type FloatField struct {
PrimitiveField
}
func NewFloatField ¶
func NewFloatField(definition interface{}) *FloatField
func (*FloatField) DefaultValue ¶
func (s *FloatField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*FloatField) IsReadableBy ¶
func (s *FloatField) IsReadableBy(f AvroType) bool
func (*FloatField) WrapperType ¶
func (s *FloatField) WrapperType() string
type IntField ¶
type IntField struct {
PrimitiveField
}
func NewIntField ¶
func NewIntField(definition interface{}) *IntField
func (*IntField) DefaultValue ¶
func (*IntField) IsReadableBy ¶
func (*IntField) WrapperType ¶
type LongField ¶
type LongField struct {
PrimitiveField
}
func NewLongField ¶
func NewLongField(definition interface{}) *LongField
func (*LongField) DefaultValue ¶
func (*LongField) IsReadableBy ¶
func (*LongField) WrapperType ¶
type MapField ¶
type MapField struct {
// contains filtered or unexported fields
}
func NewMapField ¶
func (*MapField) ConstructorMethod ¶
func (*MapField) DefaultValue ¶
func (*MapField) Definition ¶
func (s *MapField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*MapField) IsReadableBy ¶
func (*MapField) ItemConstructable ¶
func (*MapField) ResolveReferences ¶
func (*MapField) SerializerMethod ¶
func (*MapField) SimpleName ¶
func (*MapField) WrapperType ¶
type Namespace ¶
type Namespace struct { Definitions map[QualifiedName]Definition Schemas []Schema ShortUnions bool }
Namespace is a mapping of QualifiedNames to their Definitions, used to resolve type lookups within a schema.
func NewNamespace ¶
func (*Namespace) AddToPackage ¶
func (*Namespace) RegisterDefinition ¶
func (n *Namespace) RegisterDefinition(d Definition) error
RegisterDefinition adds a new type definition to the namespace. Returns an error if the type is already defined.
func (*Namespace) TypeForSchema ¶
TypeForSchema accepts an Avro schema as a JSON string, decode it and return the AvroType defined at the top level:
- a single record definition (JSON map)
- a union of multiple types (JSON array)
- an already-defined type (JSON string)
The Avro type defined at the top level and all the type definitions beneath it will also be added to this Namespace.
type NullField ¶
type NullField struct {
PrimitiveField
}
func NewNullField ¶
func NewNullField(definition interface{}) *NullField
func (*NullField) DefaultValue ¶
func (*NullField) IsReadableBy ¶
func (*NullField) WrapperType ¶
type PrimitiveField ¶
type PrimitiveField struct {
// contains filtered or unexported fields
}
Common methods for all primitive types
func (*PrimitiveField) AddStruct ¶
func (s *PrimitiveField) AddStruct(p *generator.Package, _ bool) error
func (*PrimitiveField) Definition ¶
func (s *PrimitiveField) Definition(_ map[QualifiedName]interface{}) (interface{}, error)
func (*PrimitiveField) GoType ¶
func (s *PrimitiveField) GoType() string
func (*PrimitiveField) Name ¶
func (s *PrimitiveField) Name() string
func (*PrimitiveField) ResolveReferences ¶
func (s *PrimitiveField) ResolveReferences(n *Namespace) error
func (*PrimitiveField) SerializerMethod ¶
func (s *PrimitiveField) SerializerMethod() string
func (*PrimitiveField) SimpleName ¶
func (s *PrimitiveField) SimpleName() string
type QualifiedName ¶
QualifiedName represents an Avro qualified name, which includes an optional namespace and the type name.
func ParseAvroName ¶
func ParseAvroName(enclosing, name string) QualifiedName
ParseAvroName parses a name according to the Avro spec:
- If the name contains a dot ('.'), the last part is the name and the rest is the namespace
- Otherwise, the enclosing namespace is used
func (QualifiedName) String ¶
func (q QualifiedName) String() string
type RecordDefinition ¶
type RecordDefinition struct {
// contains filtered or unexported fields
}
func NewRecordDefinition ¶
func NewRecordDefinition(name QualifiedName, aliases []QualifiedName, fields []*Field, doc string, metadata map[string]interface{}) *RecordDefinition
func (*RecordDefinition) AddStruct ¶
func (r *RecordDefinition) AddStruct(p *generator.Package, containers bool) error
func (*RecordDefinition) Aliases ¶
func (r *RecordDefinition) Aliases() []QualifiedName
func (*RecordDefinition) AvroName ¶
func (r *RecordDefinition) AvroName() QualifiedName
func (*RecordDefinition) ConstructableForField ¶
func (r *RecordDefinition) ConstructableForField(f *Field) string
func (*RecordDefinition) ConstructorMethod ¶
func (r *RecordDefinition) ConstructorMethod() string
func (*RecordDefinition) DefaultForField ¶
func (r *RecordDefinition) DefaultForField(f *Field) (string, error)
func (*RecordDefinition) DefaultValue ¶
func (r *RecordDefinition) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*RecordDefinition) Definition ¶
func (r *RecordDefinition) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*RecordDefinition) Doc ¶
func (s *RecordDefinition) Doc() string
func (*RecordDefinition) FieldByName ¶
func (r *RecordDefinition) FieldByName(field string) *Field
func (*RecordDefinition) Fields ¶
func (r *RecordDefinition) Fields() []*Field
func (*RecordDefinition) GetReaderField ¶
func (r *RecordDefinition) GetReaderField(writerField *Field) *Field
func (*RecordDefinition) GoType ¶
func (r *RecordDefinition) GoType() string
func (*RecordDefinition) IsReadableBy ¶
func (s *RecordDefinition) IsReadableBy(d Definition) bool
func (*RecordDefinition) Name ¶
func (r *RecordDefinition) Name() string
func (*RecordDefinition) NewWriterMethod ¶
func (r *RecordDefinition) NewWriterMethod() string
func (*RecordDefinition) RecordReaderTypeName ¶
func (r *RecordDefinition) RecordReaderTypeName() string
func (*RecordDefinition) ResolveReferences ¶
func (r *RecordDefinition) ResolveReferences(n *Namespace) error
func (*RecordDefinition) Schema ¶
func (s *RecordDefinition) Schema() (string, error)
func (*RecordDefinition) SerializerMethod ¶
func (r *RecordDefinition) SerializerMethod() string
func (*RecordDefinition) SimpleName ¶
func (r *RecordDefinition) SimpleName() string
func (*RecordDefinition) WrapperType ¶
func (s *RecordDefinition) WrapperType() string
type Reference ¶
type Reference struct { TypeName QualifiedName Def Definition }
func NewReference ¶
func NewReference(typeName QualifiedName) *Reference
func (*Reference) DefaultValue ¶
func (*Reference) Definition ¶
func (s *Reference) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*Reference) IsReadableBy ¶
func (*Reference) ResolveReferences ¶
func (*Reference) SerializerMethod ¶
func (*Reference) SimpleName ¶
func (*Reference) WrapperType ¶
type RequiredMapKeyError ¶
type RequiredMapKeyError struct {
Key string
}
func NewRequiredMapKeyError ¶
func NewRequiredMapKeyError(key string) *RequiredMapKeyError
func (*RequiredMapKeyError) Error ¶
func (r *RequiredMapKeyError) Error() string
type SchemaError ¶
func NewSchemaError ¶
func NewSchemaError(fieldName string, err error) *SchemaError
func (*SchemaError) Error ¶
func (s *SchemaError) Error() string
type StringField ¶
type StringField struct {
PrimitiveField
}
func NewStringField ¶
func NewStringField(definition interface{}) *StringField
func (*StringField) DefaultValue ¶
func (s *StringField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*StringField) IsReadableBy ¶
func (s *StringField) IsReadableBy(f AvroType) bool
func (*StringField) WrapperType ¶
func (s *StringField) WrapperType() string
type UnionField ¶
type UnionField struct {
// contains filtered or unexported fields
}
func NewUnionField ¶
func NewUnionField(name string, itemType []AvroType, definition []interface{}) *UnionField
func (*UnionField) AddStruct ¶
func (s *UnionField) AddStruct(p *generator.Package, containers bool) error
func (*UnionField) AvroTypes ¶
func (s *UnionField) AvroTypes() []AvroType
func (*UnionField) ConstructorMethod ¶
func (s *UnionField) ConstructorMethod() string
func (*UnionField) DefaultValue ¶
func (s *UnionField) DefaultValue(lvalue string, rvalue interface{}) (string, error)
func (*UnionField) Definition ¶
func (s *UnionField) Definition(scope map[QualifiedName]interface{}) (interface{}, error)
func (*UnionField) Equals ¶
func (s *UnionField) Equals(reader *UnionField) bool
func (*UnionField) GoType ¶
func (s *UnionField) GoType() string
func (*UnionField) IsReadableBy ¶
func (s *UnionField) IsReadableBy(f AvroType) bool
func (*UnionField) ItemConstructor ¶
func (s *UnionField) ItemConstructor(f AvroType) string
func (*UnionField) ItemName ¶
func (s *UnionField) ItemName(item AvroType) string
func (*UnionField) ItemTypes ¶
func (s *UnionField) ItemTypes() []AvroType
func (*UnionField) Name ¶
func (s *UnionField) Name() string
func (*UnionField) ResolveReferences ¶
func (s *UnionField) ResolveReferences(n *Namespace) error
func (*UnionField) SerializerMethod ¶
func (s *UnionField) SerializerMethod() string
func (*UnionField) SimpleName ¶
func (s *UnionField) SimpleName() string
func (*UnionField) UnionEnumType ¶
func (s *UnionField) UnionEnumType() string
func (*UnionField) WrapperType ¶
func (s *UnionField) WrapperType() string
type WrongMapValueTypeError ¶
func NewWrongMapValueTypeError ¶
func NewWrongMapValueTypeError(key, expectedType string, actualValue interface{}) *WrongMapValueTypeError
func (*WrongMapValueTypeError) Error ¶
func (w *WrongMapValueTypeError) Error() string