Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONFieldName ¶
func JSONFieldName(f reflect.StructField) (name string, omitEmpty bool)
JSONFieldName returns the name that the field will be given when marshaled to JSON, or the empty string if the field is ignored. It also reports whether the field has been qualified with the "omitempty" qualifier.
Types ¶
type Info ¶
type Info struct { // Type holds the Go type used for this Avro type (or nil for null). Type reflect.Type // FieldName holds the Avro name of the field. FieldName string // FieldIndex holds the index of the field if this entry is about // a struct field. FieldIndex int // MakeDefault is a function that returns the default // value for a field, or nil if there is no default value. MakeDefault func() reflect.Value // IsUnion holds whether this info is about a union type // (if not, it's about a struct). IsUnion bool // Entries holds the possible types that can // be descended in from this type. // For structs (records) this holds an entry // for each field; for union types, this holds an // entry for each possible type in the union. Entries []Info }
Info is the representation of Go types used by the analyzer. It can represent a record, a field or a type inside one of those.
Click to show internal directories.
Click to hide internal directories.