Documentation ¶
Index ¶
Constants ¶
View Source
const UTIL_FILE = "primitive.go"
Variables ¶
This section is empty.
Functions ¶
func DeserializeRecordSchema ¶
Deserialize the JSON definiton of a record and generate structs, deserializer and serializer methods. This function only supports JSON maps at the moment, where "type" -> "record". Avro also allows for schemas which are JSON arrays or JSON strings, but we don't currently support those as the root JSON type.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
Represents a Go source file in the output package
func (*File) Functions ¶
func (f *File) Functions() []FunctionName
type FunctionName ¶
type FunctionName struct {
// contains filtered or unexported fields
}
type FunctionNameList ¶
type FunctionNameList []FunctionName
Implement the Sortable interface for FunctionNames
func (FunctionNameList) Len ¶
func (f FunctionNameList) Len() int
func (FunctionNameList) Less ¶
func (f FunctionNameList) Less(i, j int) bool
Sort functions by the struct to which they're attached first, then the name of the method itself. If the function isn't attached to a struct, put it at the bottom
func (FunctionNameList) Swap ¶
func (f FunctionNameList) Swap(i, j int)
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Represents the output package
func NewPackage ¶
func (*Package) WriteFiles ¶
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 WrongMapValueTypeError ¶
func NewWrongMapValueTypeError ¶
func NewWrongMapValueTypeError(key, expectedType string, actualValue interface{}) *WrongMapValueTypeError
func (*WrongMapValueTypeError) Error ¶
func (w *WrongMapValueTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.