dat

package
v0.0.0-...-bcaf76c Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotTheBs uint64 = 0xbbbb_bbbb_bbbb_bbbb
	NullID64 uint64 = 0xfefe_fefe_fefe_fefe
	NullID32 uint32 = 0xfefe_fefe
)
View Source
const (
	TypeUint8       FieldType = "uint8"
	TypeUint16                = "uint16"
	TypeUint32                = "uint32"
	TypeUint64                = "uint64"
	TypeInt32                 = "int32"
	TypeInt64                 = "int64"
	TypeFloat32               = "float32"
	TypeFloat64               = "float64"
	TypeBool                  = "bool"
	TypeString                = "string"
	TypeListUint8             = "[]uint8"
	TypeListUint16            = "[]uint16"
	TypeListUint32            = "[]uint32"
	TypeListUint64            = "[]uint64"
	TypeListInt32             = "[]int32"
	TypeListInt64             = "[]int64"
	TypeListFloat32           = "[]float32"
	TypeListFloat64           = "[]float64"
	TypeListBool              = "[]bool"
	TypeListString            = "[]string"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataField

type DataField struct {
	Name string
	Type FieldType
}

type DataFormat

type DataFormat struct {
	Name   string
	Fields []DataField
	// contains filtered or unexported fields
}

func (*DataFormat) Size

func (df *DataFormat) Size() int

func (DataFormat) Type

func (df DataFormat) Type() reflect.Type

type DataParser

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

func InitParser

func InitParser() *DataParser

func (*DataParser) LoadFormats

func (dp *DataParser) LoadFormats(path string) error

func (*DataParser) Parse

func (p *DataParser) Parse(r io.Reader, formatName string) ([]interface{}, error)

func (*DataParser) ParseFile

func (p *DataParser) ParseFile(dataPath string, dataFormat *string) ([]interface{}, error)

type FieldType

type FieldType string

func (FieldType) ReflectType

func (ft FieldType) ReflectType() reflect.Type

func (FieldType) Size

func (ft FieldType) Size() int

func (FieldType) Valid

func (ft FieldType) Valid() bool

Jump to

Keyboard shortcuts

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