dtype

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

并发安全的 bool 对象

func NewBool

func NewBool(value ...bool) *Bool

创建一个并发安全的bool对象,并且默认值是可选

func (*Bool) Cas

func (that *Bool) Cas(old, new bool) (swapped bool)

并发安全的值比较与值交换

func (*Bool) Clone

func (that *Bool) Clone() *Bool

并发安全的克隆它

func (*Bool) MarshalJson

func (that *Bool) MarshalJson() ([]byte, error)

json序列化

func (*Bool) Set

func (that *Bool) Set(val bool) (old bool)

并发安全的设置值

func (*Bool) String

func (that *Bool) String() string

转换成字符串

func (*Bool) UnmarshalJson

func (that *Bool) UnmarshalJson(b []byte) error

json反序列化

func (*Bool) UnmarshalValue

func (that *Bool) UnmarshalValue(value interface{}) error

json反序列化的时候针对值的判断

func (*Bool) Val

func (that *Bool) Val() bool

并发安全的获取bool对象的值

type Int

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

Int 并发安全的int对象

func NewInt

func NewInt(val ...int) *Int

NewInt 创建Int对象

func (*Int) Add

func (that *Int) Add(delta int) (new int)

Add 并发安全设置int的值

func (*Int) Cas

func (that *Int) Cas(old, new int) (swapped bool)

Cas 安全的值比较与值交换

func (*Int) Clone

func (that *Int) Clone() *Int

Clone 并发安全克隆一个int对象

func (*Int) MarshalJSON

func (that *Int) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (*Int) Reduce

func (that *Int) Reduce(delta int) (new int)

Reduce 减少 delta

func (*Int) Set

func (that *Int) Set(val int) (old int)

Set 并发安全设置int的值

func (*Int) String

func (that *Int) String() string

转换成字符串

func (*Int) UnmarshalJSON

func (that *Int) UnmarshalJSON(b []byte) error

UnmarshalJSON json反序列化

func (*Int) UnmarshalValue

func (that *Int) UnmarshalValue(value interface{}) error

UnmarshalValue 值的反序列化

func (*Int) Val

func (that *Int) Val() int

Val 并发安全获取int的值

type Int32 added in v0.0.3

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

Int32 并发安全的int对象

func NewInt32 added in v0.0.3

func NewInt32(val ...int) *Int32

NewInt32 创建Int32对象

func (*Int32) Add added in v0.0.3

func (that *Int32) Add(delta int32) (new int32)

Add 并发安全设置int的值

func (*Int32) Cas added in v0.0.3

func (that *Int32) Cas(old, new int32) (swapped bool)

Cas 安全的值比较与值交换

func (*Int32) Clone added in v0.0.3

func (that *Int32) Clone() *Int32

Clone 并发安全克隆一个int对象

func (*Int32) MarshalJSON added in v0.0.3

func (that *Int32) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (*Int32) Reduce added in v0.0.3

func (that *Int32) Reduce(delta int32) (new int32)

Reduce 减少 delta

func (*Int32) Set added in v0.0.3

func (that *Int32) Set(val int32) (old int32)

Set 并发安全设置int的值

func (*Int32) String added in v0.0.3

func (that *Int32) String() string

转换成字符串

func (*Int32) UnmarshalJSON added in v0.0.3

func (that *Int32) UnmarshalJSON(b []byte) error

UnmarshalJSON json反序列化

func (*Int32) UnmarshalValue added in v0.0.3

func (that *Int32) UnmarshalValue(value interface{}) error

UnmarshalValue 值的反序列化

func (*Int32) Val added in v0.0.3

func (that *Int32) Val() int

Val 并发安全获取int的值

type Int64 added in v0.0.3

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

Int64 并发安全的int对象

func NewInt64 added in v0.0.3

func NewInt64(val ...int64) *Int64

NewInt64 创建Int对象

func (*Int64) Add added in v0.0.3

func (that *Int64) Add(delta int64) (new int64)

Add 并发安全设置int的值

func (*Int64) Cas added in v0.0.3

func (that *Int64) Cas(old, new int64) (swapped bool)

Cas 安全的值比较与值交换

func (*Int64) Clone added in v0.0.3

func (that *Int64) Clone() *Int64

Clone 并发安全克隆一个int对象

func (*Int64) MarshalJSON added in v0.0.3

func (that *Int64) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (*Int64) Reduce added in v0.0.3

func (that *Int64) Reduce(delta int64) (new int64)

Reduce 减少 delta

func (*Int64) Set added in v0.0.3

func (that *Int64) Set(val int64) (old int64)

Set 并发安全设置int的值

func (*Int64) String added in v0.0.3

func (that *Int64) String() string

转换成字符串

func (*Int64) UnmarshalJSON added in v0.0.3

func (that *Int64) UnmarshalJSON(b []byte) error

UnmarshalJSON json反序列化

func (*Int64) UnmarshalValue added in v0.0.3

func (that *Int64) UnmarshalValue(value interface{}) error

UnmarshalValue 值的反序列化

func (*Int64) Val added in v0.0.3

func (that *Int64) Val() int64

Val 并发安全获取int的值

type Interface

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

func NewInterface

func NewInterface(value ...interface{}) *Interface

NewInterface 创建interface类型

func (*Interface) Clone

func (that *Interface) Clone() *Interface

func (*Interface) MarshalJSON

func (that *Interface) MarshalJSON() ([]byte, error)

MarshalJSON 序列化json

func (*Interface) Set

func (that *Interface) Set(value interface{}) (old interface{})

Set 设置值

func (*Interface) String

func (that *Interface) String() string

转换成string

func (*Interface) UnmarshalJSON

func (that *Interface) UnmarshalJSON(b []byte) error

UnmarshalJSON 反序列化json

func (*Interface) UnmarshalValue

func (that *Interface) UnmarshalValue(value interface{}) error

UnmarshalValue 反序列化值

func (*Interface) Val

func (that *Interface) Val() interface{}

Val 获取值

type String

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

func NewString

func NewString(value ...string) *String

NewString 创建并发安全的string对象

func (*String) Clone

func (that *String) Clone() *String

func (*String) MarshalJSON

func (that *String) MarshalJSON() ([]byte, error)

func (*String) Set

func (that *String) Set(value string) (old string)

func (*String) String

func (that *String) String() string

func (*String) UnmarshalJSON

func (that *String) UnmarshalJSON(b []byte) error

func (*String) UnmarshalValue

func (that *String) UnmarshalValue(value interface{}) error

func (*String) Val

func (that *String) Val() string

Jump to

Keyboard shortcuts

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