avro

package
v0.0.0-...-b72f9b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSchema

func CreateSchema(schema string) *goavro.Codec

CreateSchema creates an avro codec from an avro schema text file

func Writer

func Writer(msg map[string]interface{}, codec *goavro.Codec) ([]byte, error)

Writer writes a user defined message with a avro codec to a slice of bytes.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader is the struct to handle the avro reader

func NewReader

func NewReader(data []byte) (*Reader, error)

NewReader Creates a new avro reader that takes []byte and returns a Reader object.

func (*Reader) ByteString

func (a *Reader) ByteString() ([]byte, error)

ByteString returns a slice of bytes containing the JSON string

func (*Reader) JSON

func (a *Reader) JSON() (string, error)

JSON returns a string that contains a JSON of the read data

func (*Reader) Map

func (a *Reader) Map() (map[string]interface{}, error)

Map returns a map containing all key value pairs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL