Documentation ¶
Index ¶
- func GAJSONToAvroBytes(fixture json.RawMessage, codec *goavro.Codec) ([]byte, error)
- func GGJSONToAvroBytes(fixture json.RawMessage, fixtureType container.AvroRecord) ([]byte, error)
- func LoadTestFixtures() ([]json.RawMessage, error)
- func LoadTestSchema() ([]byte, error)
- func RoundTrip(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
- func RoundTripEvolution(t *testing.T, oldRecordFunc, newRecordFunc RecordFactory, ...)
- func RoundTripExactBytes(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
- func RoundTripGoGenOnly(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
- type DeserMethod
- type EvolutionDeserMethod
- type EvolutionFixture
- type RecordFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GAJSONToAvroBytes ¶
func GAJSONToAvroBytes(fixture json.RawMessage, codec *goavro.Codec) ([]byte, error)
func GGJSONToAvroBytes ¶
func GGJSONToAvroBytes(fixture json.RawMessage, fixtureType container.AvroRecord) ([]byte, error)
func LoadTestFixtures ¶
func LoadTestFixtures() ([]json.RawMessage, error)
func LoadTestSchema ¶
Get the schema file from our conventional path
func RoundTrip ¶
func RoundTrip(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
RoundTrip tests that: - gogen-avro can decode avro-enocded data from goavro and the Go data is identical - goavro can decode JSON-encoded data from gogen-avro and the Go data is identical
func RoundTripEvolution ¶
func RoundTripEvolution(t *testing.T, oldRecordFunc, newRecordFunc RecordFactory, newDeserMethod EvolutionDeserMethod)
func RoundTripExactBytes ¶
func RoundTripExactBytes(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
RoundTripExactBytes tests that: - the avro-encoded bytes from goavro and gogen-avro are identical - gogen-avro can decode avro-enocded data from goavro and the Go data is identical - goavro can decode JSON-encoded data from gogen-avro and the Go data is identical
For schemas with maps use RoundTrip instead since maps are not encoded deterministically.
func RoundTripGoGenOnly ¶
func RoundTripGoGenOnly(t *testing.T, recordFunc RecordFactory, deserMethod DeserMethod)
RoundTripGoGenOnly tests that a JSON fixture can be serialized as avro bytes, then re-serialized into equivalent JSON. This is used for tests that can't use goavro because the definitions are spread across multiple schema files.
Types ¶
type DeserMethod ¶
type DeserMethod func(io.Reader) (container.AvroRecord, error)
type EvolutionDeserMethod ¶
type EvolutionFixture ¶
type EvolutionFixture struct { Data json.RawMessage Expected json.RawMessage Err *string }
func LoadEvolutionFixtures ¶
func LoadEvolutionFixtures() ([]EvolutionFixture, error)
type RecordFactory ¶
type RecordFactory func() container.AvroRecord
Directories ¶
Path | Synopsis |
---|---|
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
benchmark
|
|
models
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v8.
|
Code generated by github.com/actgardner/gogen-avro/v8. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
evolution
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |
Code generated by github.com/actgardner/gogen-avro/v10.
|
Code generated by github.com/actgardner/gogen-avro/v10. |