zavro

package
v0.0.0-...-b2b14e4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadValue = errors.New("bad zng value in kavro translator")

These errors shouldn't happen because the input should be type checked.

Functions

func Encode

func Encode(dst []byte, id uint32, r *zng.Record) ([]byte, error)

func GenSchema

func GenSchema(typ zng.Type, namespace string) avro.Schema

Types

type MicroTimeSchema

type MicroTimeSchema struct{}

MicroTimeSchema implements avro.Schema and represents Avro long type.

func (*MicroTimeSchema) GetName

func (*MicroTimeSchema) GetName() string

GetName returns a type name for this MicroTimeSchema.

func (*MicroTimeSchema) MarshalJSON

func (*MicroTimeSchema) MarshalJSON() ([]byte, error)

MarshalJSON serializes the given schema as JSON. Never returns an error.

func (*MicroTimeSchema) Prop

func (*MicroTimeSchema) Prop(key string) (interface{}, bool)

Prop doesn't return anything valuable for LongSchema.

func (*MicroTimeSchema) String

func (*MicroTimeSchema) String() string

Returns a JSON representation of LongSchema.

func (*MicroTimeSchema) Type

func (*MicroTimeSchema) Type() int

Type returns a type constant for this MicroTimeSchema.

func (*MicroTimeSchema) Validate

func (*MicroTimeSchema) Validate(v reflect.Value) bool

Validate checks whether the given value is writeable to this schema.

Jump to

Keyboard shortcuts

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