Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AvroTypes = map[types.Type]string{ types.Message: "record", types.Bool: "boolean", types.Int32: "int", types.Int64: "int", types.Float: "float", types.Double: "double", types.Bytes: "bytes", types.String: "string", types.Enum: "enum", types.Array: "array", }
AvroTypes is a lookup table for avro descriptor types
View Source
var Types = map[string]types.Type{ "record": types.Message, "boolean": types.Bool, "int": types.Int64, "float": types.Float, "double": types.Double, "bytes": types.Bytes, "string": types.String, "enum": types.Enum, "array": types.Array, }
Types is a lookup table for avro descriptor types
Functions ¶
func NewMessage ¶
func NewMessage(path string, message *AvroSchema) *specs.Property
NewMessage constructs a schema Property with the given avro schema
func NewProperty ¶
func NewProperty(path string, message *AvroSchema) *specs.Property
NewProperty constructs a schema Property with the given avro schema
func NewSchema ¶
func NewSchema(descriptors []*AvroSchema) specs.Schemas
NewSchema constructs a new schema manifest from the given avro schema
func SchemaResolver ¶
func SchemaResolver(imports []string, path string) providers.SchemaResolver
SchemaResolver returns a new schema resolver for the given avro collection
Types ¶
type AvroSchema ¶
type AvroSchema struct { Type string `json:"type"` Name string `json:"name"` Namespace string `json:"namespace"` Symbols []string `json:"symbols"` Fields []*AvroSchema `json:"fields"` }
AvroSchema impliments avro high level schema
func Collect ¶
Collect attempts to collect all the available avro files inside the given path and parses them to resources
func UnmarshalFiles ¶
func UnmarshalFiles(imports []string, files []*providers.FileInfo) ([]*AvroSchema, error)
UnmarshalFiles attempts to parse the given HCL files to intermediate resources. Files are parsed based from the given import paths
Click to show internal directories.
Click to hide internal directories.