field

package
v0.0.0-...-ae93dba Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Character

type Character struct {
	Field
	String string
}

Character field is a string of characters.

func DecodeCharacter

func DecodeCharacter(buf []byte, name string, encoding cpg.CharacterEncoding) (*Character, error)

DecodeCharacter decodes a single character field with the specified encoding.

func (*Character) Value

func (c *Character) Value() interface{}

Value returns the field value.

type Field

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

Field base type.

func (Field) Name

func (f Field) Name() string

Name returns the field name.

type FloatingPoint

type FloatingPoint Numeric

FloatingPoint field.

func DecodeFloatingPoint

func DecodeFloatingPoint(buf []byte, name string) (*FloatingPoint, error)

DecodeFloatingPoint decodes a single floating point field.

func (*FloatingPoint) Value

func (f *FloatingPoint) Value() interface{}

Value returns the field value.

type Numeric

type Numeric struct {
	Field
	Number float64
}

Numeric field.

func DecodeNumeric

func DecodeNumeric(buf []byte, name string) (*Numeric, error)

DecodeNumeric decodes a single numeric field.

func (*Numeric) Value

func (n *Numeric) Value() interface{}

Value returns the field value.

Jump to

Keyboard shortcuts

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