avro

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteWriter

type ByteWriter interface {
	Grow(int)
	WriteByte(byte) error
}

type Measure

type Measure struct {
	Event_time int64
	Value      float32
}

func DeserializeMeasure

func DeserializeMeasure(r io.Reader) (*Measure, error)

func NewMeasure

func NewMeasure() *Measure

func (*Measure) Schema

func (r *Measure) Schema() string

func (*Measure) Serialize

func (r *Measure) Serialize(w io.Writer) error

type Snapshot

type Snapshot struct {
	Data_url       string
	Alias_url      string
	Human_url      string
	Name           string
	River_name     string
	Lat            float32
	Lg             float32
	Unit           string
	Type           TypeValues
	Readings       []*Measure
	Correlation_id string
	Causation_id   string
	Processed_time int64
}

func DeserializeSnapshot

func DeserializeSnapshot(r io.Reader) (*Snapshot, error)

func NewSnapshot

func NewSnapshot() *Snapshot

func (*Snapshot) Schema

func (r *Snapshot) Schema() string

func (*Snapshot) Serialize

func (r *Snapshot) Serialize(w io.Writer) error

type StringWriter

type StringWriter interface {
	WriteString(string) (int, error)
}

type TypeValues

type TypeValues int32
const (
	Level       TypeValues = 0
	Flow        TypeValues = 1
	Temperature TypeValues = 2
	Rainfall    TypeValues = 3
)

func (TypeValues) String

func (e TypeValues) String() string

type UnionMeasureSnapshot

type UnionMeasureSnapshot struct {
	Measure   *Measure
	Snapshot  *Snapshot
	UnionType UnionMeasureSnapshotTypeEnum
}

type UnionMeasureSnapshotTypeEnum

type UnionMeasureSnapshotTypeEnum int
const (
	UnionMeasureSnapshotTypeEnumMeasure  UnionMeasureSnapshotTypeEnum = 0
	UnionMeasureSnapshotTypeEnumSnapshot UnionMeasureSnapshotTypeEnum = 1
)

Jump to

Keyboard shortcuts

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