Documentation ¶
Overview ¶
*
- Avro schema unmarshaler parse JSON based schema and extract it as Go values.
- It follows Avro 1.8.2 specification.
- https://avro.apache.org/docs/1.8.2/spec.html *
Index ¶
Constants ¶
View Source
const ( AvroPrimitiveType_Null = "null" AvroPrimitiveType_Boolean = "boolean" AvroPrimitiveType_Int = "int" AvroPrimitiveType_Long = "long" AvroPrimitiveType_Float = "float" AvroPrimitiveType_Double = "double" AvroPrimitiveType_Bytes = "bytes" AvroPrimitiveType_String = "string" AvroComplexType_Record = "record" AvroComplexType_Enums = "enum" AvroComplexType_Array = "array" AvroComplexType_Maps = "map" AvroComplexType_Fixed = "fixed" AvroLogicalType_Decimal = "decimal" AvroLogicalType_Date = "date" AvroLogicalType_TimeMillis = "time-millis" AvroLogicalType_TimeMicros = "time-micros" AvroLogicalType_TimestampMillis = "timestamp-millis" AvroLogicalType_TimestampMicros = "timestamp-micros" AvroLogicalType_Duration = "duration" )
Variables ¶
View Source
var (
ErrInvalidAvroSchema = fmt.Errorf("invalid avro schema because of unexpected data")
)
Functions ¶
This section is empty.
Types ¶
type AvroType ¶
type AvroType struct { PrimitiveType *PrimitiveType RecordType *RecordType EnumsType *EnumsType ArrayType *ArrayType MapsType *MapsType UnionType *UnionType FixedType *FixedType LogicalType *LogicalType DefinedType *DefinedType }
AvroType is an union type of Avro types
func (*AvroType) UnmarshalJSON ¶
UnmarshalJSON gets actual Avro type(s) recursively.
type DefinedType ¶
type DefinedType string // a type name already defined before
type LogicalType ¶
type PrimitiveType ¶
type PrimitiveType string
func ToPrimitiveType ¶
func ToPrimitiveType(v string) *PrimitiveType
type RecordField ¶
type RecordType ¶
Click to show internal directories.
Click to hide internal directories.