utils

package
v0.0.0-...-71d5ba4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElementName

func ElementName(i interface{}) string

func IsFileExists

func IsFileExists(name string) bool

func StructName

func StructName(i interface{}) string

Types

type Identifier

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

func NewIdentifier

func NewIdentifier(sign byte) *Identifier

@sign id的前几位用于区分用途

func (*Identifier) GenIdentity

func (i *Identifier) GenIdentity() uint32

func (*Identifier) IsValidIdentity

func (i *Identifier) IsValidIdentity(id uint32) bool

type Value

type Value interface {
	Set(i interface{})
	Get() interface{}
	GetInt() int
	GetInt8() int8
	GetInt16() int16
	GetInt32() int32
	GetInt64() int64
	GetUint() uint
	GetUint8() uint8
	GetUint16() uint16
	GetUint32() uint32
	GetUint64() uint64
	GetFloat32() float32
	GetFloat64() float64
	GetString() string
	GetBool() bool
	GetIntArray() []int
	GetInt8Array() []int8
	GetInt16Array() []int16
	GetInt32Array() []int32
	GetInt64Array() []int64
	GetUintArray() []uint
	GetUint8Array() []uint8
	GetUint16Array() []uint16
	GetUint32Array() []uint32
	GetUint64Array() []uint64
	GetFloat32Array() []float32
	GetFloat64Array() []float64
	GetStringArray() []string
	GetBoolArray() []bool
	GetByteArray() []byte
}

func NewValue

func NewValue() Value

type ValueMap

type ValueMap interface {
	Put(key string, value interface{})
	Get(key string) Value
	Has(key string) bool
	Del(key string)
	Range(f func(k string, v Value) bool)
}

func NewConcurrentValueMap

func NewConcurrentValueMap() ValueMap

func NewValueMap

func NewValueMap() ValueMap

Jump to

Keyboard shortcuts

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