properties

package
v0.0.0-...-947ae56 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROP_TYPE_NULL byte = iota
	PROP_TYPE_BOOL
	PROP_TYPE_STRING
	PROP_TYPE_INT32
	PROP_TYPE_UINT32
	PROP_TYPE_FLOAT32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Properties

type Properties struct {
	Map map[string]Property
}

func New

func New() *Properties

func (*Properties) Add

func (si *Properties) Add(k string, t byte, v interface{}) bool

func (*Properties) AddBool

func (si *Properties) AddBool(k string, v bool) bool

func (*Properties) AddFloat32

func (si *Properties) AddFloat32(k string, v float32) bool

func (*Properties) AddInt32

func (si *Properties) AddInt32(k string, v int32) bool

func (*Properties) AddNil

func (si *Properties) AddNil(k string) bool

func (*Properties) AddString

func (si *Properties) AddString(k string, v string) bool

func (*Properties) AddUint32

func (si *Properties) AddUint32(k string, v uint32) bool

func (*Properties) AsString

func (si *Properties) AsString(k string) string

func (*Properties) Clear

func (si *Properties) Clear()

func (*Properties) MarshalJSON

func (si *Properties) MarshalJSON() ([]byte, error)

type Property

type Property struct {
	Type  byte        `json:"-"`
	Value interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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