Documentation ¶
Index ¶
Constants ¶
View Source
const UTIL_FILE = "primitive.go"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface { // The field name Name() string // The friendly type name FieldType() string // The corresponding Go type 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) // 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) }
type RecordDefinition ¶
type RecordDefinition struct {
// contains filtered or unexported fields
}
func RecordDefinitionForSchema ¶
func RecordDefinitionForSchema(schemaJson []byte) (*RecordDefinition, error)
Given a JSON record definition as a JSON encoded string, deserialize the JSON and build the record definition structs
func (*RecordDefinition) AddDeserializer ¶
func (r *RecordDefinition) AddDeserializer(p *generator.Package)
func (*RecordDefinition) AddSerializer ¶
func (r *RecordDefinition) AddSerializer(p *generator.Package)
func (*RecordDefinition) AddStruct ¶
func (r *RecordDefinition) AddStruct(p *generator.Package)
func (*RecordDefinition) GoType ¶
func (r *RecordDefinition) GoType() string
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.