/
avro_type.go
28 lines (22 loc) · 961 Bytes
/
avro_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package types
import (
"gopkg.in/actgardner/gogen-avro.v5/generator"
)
type AvroType interface {
Name() string
GoType() string
// The name of the method which writes this field onto the wire
SerializerMethod() string
// The name of the method which reads this field off the wire
DeserializerMethod() string
// Add the imports and struct for the definition of this type to the generator.Package
AddStruct(*generator.Package, bool) error
// Add the imports, methods and structs required for the serializer to the generator.Package
AddSerializer(*generator.Package)
// Add the imports, methods and structs required for the deserializer to the generator.Package
AddDeserializer(*generator.Package)
// 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)
}