keyvalues

package
v0.0.0-...-f7db80a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNone byte = iota
	TypeString
	TypeInt32
	TypeFloat32
	TypePointer
	TypeWideString
	TypeColor
	TypeUint64
	TypeEnd
)

Variables

This section is empty.

Functions

func ReadByte

func ReadByte(r io.Reader) (byte, error)

func ReadFloat32

func ReadFloat32(r io.Reader) (float32, error)

func ReadInt32

func ReadInt32(r io.Reader) (int32, error)

func ReadString

func ReadString(r io.Reader) (string, error)

func ReadUint32

func ReadUint32(r io.Reader) (uint32, error)

Types

type KeyValue

type KeyValue struct {
	Key      string
	Value    interface{}
	Children []*KeyValue
}

func Unmarshal

func Unmarshal(data []byte) (*KeyValue, error)

func UnmarshalBinary

func UnmarshalBinary(rd io.Reader) (*KeyValue, error)

func (*KeyValue) GetChild

func (kv *KeyValue) GetChild(key string) *KeyValue

func (*KeyValue) MarshalJSON

func (kv *KeyValue) MarshalJSON() ([]byte, error)

func (*KeyValue) ParseBool

func (kv *KeyValue) ParseBool() (bool, error)

func (*KeyValue) SetChild

func (kv *KeyValue) SetChild(value *KeyValue)

func (*KeyValue) String

func (kv *KeyValue) String() string

type Token

type Token struct {
	Type  TokenType
	Value string
}

type TokenType

type TokenType byte
const (
	TokenType_String TokenType = iota
	TokenType_ChildStart
	TokenType_ChildEnd
)

Jump to

Keyboard shortcuts

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