types

package
v6.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 0 Imported by: 569

Documentation

Overview

Wrappers for Avro primitive types implementing the methods required by GADGT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean bool

func (*Boolean) AppendArray

func (b *Boolean) AppendArray() Field

func (*Boolean) AppendMap

func (b *Boolean) AppendMap(key string) Field

func (*Boolean) Finalize

func (b *Boolean) Finalize()

func (*Boolean) Get

func (b *Boolean) Get(i int) Field

func (*Boolean) SetBoolean

func (b *Boolean) SetBoolean(v bool)

func (*Boolean) SetBytes

func (b *Boolean) SetBytes(v []byte)

func (*Boolean) SetDefault

func (b *Boolean) SetDefault(i int)

func (*Boolean) SetDouble

func (b *Boolean) SetDouble(v float64)

func (*Boolean) SetFloat

func (b *Boolean) SetFloat(v float32)

func (*Boolean) SetInt

func (b *Boolean) SetInt(v int32)

func (*Boolean) SetLong

func (b *Boolean) SetLong(v int64)

func (*Boolean) SetString

func (b *Boolean) SetString(v string)

func (*Boolean) SetUnionElem

func (b *Boolean) SetUnionElem(v int64)

type Bytes

type Bytes []byte

func (*Bytes) AppendArray

func (b *Bytes) AppendArray() Field

func (*Bytes) AppendMap

func (b *Bytes) AppendMap(key string) Field

func (*Bytes) Finalize

func (b *Bytes) Finalize()

func (*Bytes) Get

func (b *Bytes) Get(i int) Field

func (*Bytes) SetBoolean

func (b *Bytes) SetBoolean(v bool)

func (*Bytes) SetBytes

func (b *Bytes) SetBytes(v []byte)

func (*Bytes) SetDefault

func (b *Bytes) SetDefault(i int)

func (*Bytes) SetDouble

func (b *Bytes) SetDouble(v float64)

func (*Bytes) SetFloat

func (b *Bytes) SetFloat(v float32)

func (*Bytes) SetInt

func (b *Bytes) SetInt(v int32)

func (*Bytes) SetLong

func (b *Bytes) SetLong(v int64)

func (*Bytes) SetString

func (b *Bytes) SetString(v string)

func (*Bytes) SetUnionElem

func (b *Bytes) SetUnionElem(v int64)

type Double

type Double float64

func (*Double) AppendArray

func (b *Double) AppendArray() Field

func (*Double) AppendMap

func (b *Double) AppendMap(key string) Field

func (*Double) Finalize

func (b *Double) Finalize()

func (*Double) Get

func (b *Double) Get(i int) Field

func (*Double) SetBoolean

func (b *Double) SetBoolean(v bool)

func (*Double) SetBytes

func (b *Double) SetBytes(v []byte)

func (*Double) SetDefault

func (b *Double) SetDefault(i int)

func (*Double) SetDouble

func (b *Double) SetDouble(v float64)

func (*Double) SetFloat

func (b *Double) SetFloat(v float32)

func (*Double) SetInt

func (b *Double) SetInt(v int32)

func (*Double) SetLong

func (b *Double) SetLong(v int64)

func (*Double) SetString

func (b *Double) SetString(v string)

func (*Double) SetUnionElem

func (b *Double) SetUnionElem(v int64)

type Field

type Field interface {
	// Assign a primitive field
	SetBoolean(v bool)
	SetInt(v int32)
	SetLong(v int64)
	SetFloat(v float32)
	SetDouble(v float64)
	SetBytes(v []byte)
	SetString(v string)

	// Get a nested field
	Get(i int) Field
	// Set the default value for a given field
	SetDefault(i int)

	// Append a new value to a map or array and enter it
	AppendMap(key string) Field
	AppendArray() Field

	// Finalize a field if necessary
	Finalize()
}

The interface neeed by GADGT to enter and set fields on a type Most types only need to implement a subset

type Float

type Float float32

func (*Float) AppendArray

func (b *Float) AppendArray() Field

func (*Float) AppendMap

func (b *Float) AppendMap(key string) Field

func (*Float) Finalize

func (b *Float) Finalize()

func (*Float) Get

func (b *Float) Get(i int) Field

func (*Float) SetBoolean

func (b *Float) SetBoolean(v bool)

func (*Float) SetBytes

func (b *Float) SetBytes(v []byte)

func (*Float) SetDefault

func (b *Float) SetDefault(i int)

func (*Float) SetDouble

func (b *Float) SetDouble(v float64)

func (*Float) SetFloat

func (b *Float) SetFloat(v float32)

func (*Float) SetInt

func (b *Float) SetInt(v int32)

func (*Float) SetLong

func (b *Float) SetLong(v int64)

func (*Float) SetString

func (b *Float) SetString(v string)

func (*Float) SetUnionElem

func (b *Float) SetUnionElem(v int64)

type Int

type Int int32

func (*Int) AppendArray

func (b *Int) AppendArray() Field

func (*Int) AppendMap

func (b *Int) AppendMap(key string) Field

func (*Int) Finalize

func (b *Int) Finalize()

func (*Int) Get

func (b *Int) Get(i int) Field

func (*Int) SetBoolean

func (b *Int) SetBoolean(v bool)

func (*Int) SetBytes

func (b *Int) SetBytes(v []byte)

func (*Int) SetDefault

func (b *Int) SetDefault(i int)

func (*Int) SetDouble

func (b *Int) SetDouble(v float64)

func (*Int) SetFloat

func (b *Int) SetFloat(v float32)

func (*Int) SetInt

func (b *Int) SetInt(v int32)

func (*Int) SetLong

func (b *Int) SetLong(v int64)

func (*Int) SetString

func (b *Int) SetString(v string)

func (*Int) SetUnionElem

func (b *Int) SetUnionElem(v int64)

type Long

type Long int64

func (*Long) AppendArray

func (b *Long) AppendArray() Field

func (*Long) AppendMap

func (b *Long) AppendMap(key string) Field

func (*Long) Finalize

func (b *Long) Finalize()

func (*Long) Get

func (b *Long) Get(i int) Field

func (*Long) SetBoolean

func (b *Long) SetBoolean(v bool)

func (*Long) SetBytes

func (b *Long) SetBytes(v []byte)

func (*Long) SetDefault

func (b *Long) SetDefault(i int)

func (*Long) SetDouble

func (b *Long) SetDouble(v float64)

func (*Long) SetFloat

func (b *Long) SetFloat(v float32)

func (*Long) SetInt

func (b *Long) SetInt(v int32)

func (*Long) SetLong

func (b *Long) SetLong(v int64)

func (*Long) SetString

func (b *Long) SetString(v string)

func (*Long) SetUnionElem

func (b *Long) SetUnionElem(v int64)

type NullVal

type NullVal struct{}

func (*NullVal) AppendArray

func (b *NullVal) AppendArray() Field

func (*NullVal) AppendMap

func (b *NullVal) AppendMap(key string) Field

func (*NullVal) Finalize

func (b *NullVal) Finalize()

func (*NullVal) Get

func (b *NullVal) Get(i int) Field

func (*NullVal) SetBoolean

func (b *NullVal) SetBoolean(v bool)

func (*NullVal) SetBytes

func (b *NullVal) SetBytes(v []byte)

func (*NullVal) SetDefault

func (b *NullVal) SetDefault(i int)

func (*NullVal) SetDouble

func (b *NullVal) SetDouble(v float64)

func (*NullVal) SetFloat

func (b *NullVal) SetFloat(v float32)

func (*NullVal) SetInt

func (b *NullVal) SetInt(v int32)

func (*NullVal) SetLong

func (b *NullVal) SetLong(v int64)

func (*NullVal) SetString

func (b *NullVal) SetString(v string)

func (*NullVal) SetUnionElem

func (b *NullVal) SetUnionElem(v int64)

type String

type String string

func (*String) AppendArray

func (b *String) AppendArray() Field

func (*String) AppendMap

func (b *String) AppendMap(key string) Field

func (*String) Finalize

func (b *String) Finalize()

func (*String) Get

func (b *String) Get(i int) Field

func (*String) SetBoolean

func (b *String) SetBoolean(v bool)

func (*String) SetBytes

func (b *String) SetBytes(v []byte)

func (*String) SetDefault

func (b *String) SetDefault(i int)

func (*String) SetDouble

func (b *String) SetDouble(v float64)

func (*String) SetFloat

func (b *String) SetFloat(v float32)

func (*String) SetInt

func (b *String) SetInt(v int32)

func (*String) SetLong

func (b *String) SetLong(v int64)

func (*String) SetString

func (b *String) SetString(v string)

func (*String) SetUnionElem

func (b *String) SetUnionElem(v int64)

Jump to

Keyboard shortcuts

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