goavro

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: BSD-2-Clause Imports: 8 Imported by: 14

README

goavro

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Union added in v0.0.2

func Union(name string, datum interface{}) interface{}

Union wraps a datum value in a map for encoding as a Union, as required by Union encoder.

Types

type BinaryCoder

type BinaryCoder interface {
	BinaryDecoder
	BinaryEncoder
}

BinaryCoder interface describes types that expose both the Decode and the Encode methods.

func NewCodec

func NewCodec(schemaSpecification string) (BinaryCoder, error)

NewCodec returns a Codec that can encode and decode the specified Avro schema.

type BinaryDecoder

type BinaryDecoder interface {
	BinaryDecode([]byte) (interface{}, []byte, error)
}

BinaryDecoder interface describes types that expose the Decode method.

type BinaryEncoder

type BinaryEncoder interface {
	BinaryEncode([]byte, interface{}) ([]byte, error)
}

BinaryEncoder interface describes types that expose the Encode method.

type ErrInvalidName

type ErrInvalidName struct {
	Message string
}

ErrInvalidName is the error returned when one or more parts of an Avro name is invalid.

func (ErrInvalidName) Error

func (e ErrInvalidName) Error() string

type Name

type Name struct {
	FullName  string // the instance's Avro name
	Namespace string // for use when building new name from existing one
}

Name describes an Avro name in terms of its full name and namespace.

func NewName

func NewName(name, namespace, enclosingNamespace string) (*Name, error)

NewName returns a new Name instance after first ensuring the arguments do not violate any of the Avro naming rules.

func (Name) Equal

func (n Name) Equal(n2 Name) bool

Equal returns true when two Name instances refer to the same Avro name; otherwise it returns false.

func (Name) String

func (n Name) String() string

Jump to

Keyboard shortcuts

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