Documentation ¶
Index ¶
- type Bool
- func (that *Bool) Cas(old, new bool) (swapped bool)
- func (that *Bool) Clone() *Bool
- func (that *Bool) MarshalJson() ([]byte, error)
- func (that *Bool) Set(val bool) (old bool)
- func (that *Bool) String() string
- func (that *Bool) UnmarshalJson(b []byte) error
- func (that *Bool) UnmarshalValue(value interface{}) error
- func (that *Bool) Val() bool
- type Byte
- func (that *Byte) Add(delta byte) (new byte)
- func (that *Byte) Cas(old, new byte) (swapped bool)
- func (that *Byte) Clone() *Byte
- func (that *Byte) MarshalJSON() ([]byte, error)
- func (that *Byte) Set(value byte) (old byte)
- func (that *Byte) String() string
- func (that *Byte) UnmarshalJSON(b []byte) error
- func (that *Byte) UnmarshalValue(value interface{}) error
- func (that *Byte) Val() byte
- type Bytes
- func (that *Bytes) Clone() *Bytes
- func (that *Bytes) MarshalJSON() ([]byte, error)
- func (that *Bytes) Set(value []byte) (old []byte)
- func (that *Bytes) String() string
- func (that *Bytes) UnmarshalJSON(b []byte) error
- func (that *Bytes) UnmarshalValue(value interface{}) error
- func (that *Bytes) Val() []byte
- type Float32
- func (v *Float32) Add(delta float32) (new float32)
- func (v *Float32) Cas(old, new float32) (swapped bool)
- func (v *Float32) Clone() *Float32
- func (v *Float32) MarshalJSON() ([]byte, error)
- func (v *Float32) Set(value float32) (old float32)
- func (v *Float32) String() string
- func (v *Float32) UnmarshalJSON(b []byte) error
- func (v *Float32) UnmarshalValue(value interface{}) error
- func (v *Float32) Val() float32
- type Float64
- func (v *Float64) Add(delta float64) (new float64)
- func (v *Float64) Cas(old, new float64) (swapped bool)
- func (v *Float64) Clone() *Float64
- func (v *Float64) MarshalJSON() ([]byte, error)
- func (v *Float64) Set(value float64) (old float64)
- func (v *Float64) String() string
- func (v *Float64) UnmarshalJSON(b []byte) error
- func (v *Float64) UnmarshalValue(value interface{}) error
- func (v *Float64) Val() float64
- type Int
- func (that *Int) Add(delta int) (new int)
- func (that *Int) Cas(old, new int) (swapped bool)
- func (that *Int) Clone() *Int
- func (that *Int) MarshalJSON() ([]byte, error)
- func (that *Int) Reduce(delta int) (new int)
- func (that *Int) Set(val int) (old int)
- func (that *Int) String() string
- func (that *Int) UnmarshalJSON(b []byte) error
- func (that *Int) UnmarshalValue(value interface{}) error
- func (that *Int) Val() int
- type Int32
- func (that *Int32) Add(delta int32) (new int32)
- func (that *Int32) Cas(old, new int32) (swapped bool)
- func (that *Int32) Clone() *Int32
- func (that *Int32) MarshalJSON() ([]byte, error)
- func (that *Int32) Reduce(delta int32) (new int32)
- func (that *Int32) Set(val int32) (old int32)
- func (that *Int32) String() string
- func (that *Int32) UnmarshalJSON(b []byte) error
- func (that *Int32) UnmarshalValue(value interface{}) error
- func (that *Int32) Val() int
- type Int64
- func (that *Int64) Add(delta int64) (new int64)
- func (that *Int64) Cas(old, new int64) (swapped bool)
- func (that *Int64) Clone() *Int64
- func (that *Int64) MarshalJSON() ([]byte, error)
- func (that *Int64) Reduce(delta int64) (new int64)
- func (that *Int64) Set(val int64) (old int64)
- func (that *Int64) String() string
- func (that *Int64) UnmarshalJSON(b []byte) error
- func (that *Int64) UnmarshalValue(value interface{}) error
- func (that *Int64) Val() int64
- type Interface
- func (that *Interface) Clone() *Interface
- func (that *Interface) MarshalJSON() ([]byte, error)
- func (that *Interface) Set(value interface{}) (old interface{})
- func (that *Interface) String() string
- func (that *Interface) UnmarshalJSON(b []byte) error
- func (that *Interface) UnmarshalValue(value interface{}) error
- func (that *Interface) Val() interface{}
- type String
- func (that *String) Clone() *String
- func (that *String) MarshalJSON() ([]byte, error)
- func (that *String) Set(value string) (old string)
- func (that *String) String() string
- func (that *String) UnmarshalJSON(b []byte) error
- func (that *String) UnmarshalValue(value interface{}) error
- func (that *String) Val() string
- type Type
- type Uint
- func (v *Uint) Add(delta uint) (new uint)
- func (v *Uint) Cas(old, new uint) (swapped bool)
- func (v *Uint) Clone() *Uint
- func (v *Uint) MarshalJSON() ([]byte, error)
- func (v *Uint) Set(value uint) (old uint)
- func (v *Uint) String() string
- func (v *Uint) UnmarshalJSON(b []byte) error
- func (v *Uint) UnmarshalValue(value interface{}) error
- func (v *Uint) Val() uint
- type Uint32
- func (v *Uint32) Add(delta uint32) (new uint32)
- func (v *Uint32) Cas(old, new uint32) (swapped bool)
- func (v *Uint32) Clone() *Uint32
- func (v *Uint32) MarshalJSON() ([]byte, error)
- func (v *Uint32) Set(value uint32) (old uint32)
- func (v *Uint32) String() string
- func (v *Uint32) UnmarshalJSON(b []byte) error
- func (v *Uint32) UnmarshalValue(value interface{}) error
- func (v *Uint32) Val() uint32
- type Uint64
- func (v *Uint64) Add(delta uint64) (new uint64)
- func (v *Uint64) Cas(old, new uint64) (swapped bool)
- func (v *Uint64) Clone() *Uint64
- func (v *Uint64) MarshalJSON() ([]byte, error)
- func (v *Uint64) Set(value uint64) (old uint64)
- func (v *Uint64) String() string
- func (v *Uint64) UnmarshalJSON(b []byte) error
- func (v *Uint64) UnmarshalValue(value interface{}) error
- func (v *Uint64) Val() uint64
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 并发安全的 bool 对象
func (*Bool) UnmarshalValue ¶
UnmarshalValue json反序列化的时候针对值的判断
type Byte ¶ added in v0.0.7
type Byte struct {
// contains filtered or unexported fields
}
Byte 并发安全的byte类型
func (*Byte) MarshalJSON ¶ added in v0.0.7
func (*Byte) UnmarshalJSON ¶ added in v0.0.7
func (*Byte) UnmarshalValue ¶ added in v0.0.7
type Bytes ¶ added in v0.0.7
type Bytes struct {
// contains filtered or unexported fields
}
Bytes 并发安全的bytes数组,[]byte
func (*Bytes) MarshalJSON ¶ added in v0.0.7
func (*Bytes) UnmarshalJSON ¶ added in v0.0.7
func (*Bytes) UnmarshalValue ¶ added in v0.0.7
type Float32 ¶ added in v0.0.7
type Float32 struct {
// contains filtered or unexported fields
}
Float32 is a struct for concurrent-safe operation for type float32.
func NewFloat32 ¶ added in v0.0.7
NewFloat32 creates and returns a concurrent-safe object for float32 type, with given initial value <value>.
func (*Float32) Add ¶ added in v0.0.7
Add atomically adds <delta> to t.value and returns the new value.
func (*Float32) Clone ¶ added in v0.0.7
Clone clones and returns a new concurrent-safe object for float32 type.
func (*Float32) MarshalJSON ¶ added in v0.0.7
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Float32) Set ¶ added in v0.0.7
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Float32) UnmarshalJSON ¶ added in v0.0.7
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Float32) UnmarshalValue ¶ added in v0.0.7
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Float64 ¶ added in v0.0.7
type Float64 struct {
// contains filtered or unexported fields
}
Float64 is a struct for concurrent-safe operation for type float64.
func NewFloat64 ¶ added in v0.0.7
NewFloat64 creates and returns a concurrent-safe object for float64 type, with given initial value <value>.
func (*Float64) Add ¶ added in v0.0.7
Add atomically adds <delta> to t.value and returns the new value.
func (*Float64) Clone ¶ added in v0.0.7
Clone clones and returns a new concurrent-safe object for float64 type.
func (*Float64) MarshalJSON ¶ added in v0.0.7
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Float64) Set ¶ added in v0.0.7
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Float64) UnmarshalJSON ¶ added in v0.0.7
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Float64) UnmarshalValue ¶ added in v0.0.7
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int 并发安全的int对象
func (*Int) UnmarshalValue ¶
UnmarshalValue 值的反序列化
type Int32 ¶ added in v0.0.3
type Int32 struct {
// contains filtered or unexported fields
}
Int32 并发安全的int对象
func (*Int32) MarshalJSON ¶ added in v0.0.3
MarshalJSON json序列化
func (*Int32) UnmarshalJSON ¶ added in v0.0.3
UnmarshalJSON json反序列化
func (*Int32) UnmarshalValue ¶ added in v0.0.3
UnmarshalValue 值的反序列化
type Int64 ¶ added in v0.0.3
type Int64 struct {
// contains filtered or unexported fields
}
Int64 并发安全的int对象
func (*Int64) MarshalJSON ¶ added in v0.0.3
MarshalJSON json序列化
func (*Int64) UnmarshalJSON ¶ added in v0.0.3
UnmarshalJSON json反序列化
func (*Int64) UnmarshalValue ¶ added in v0.0.3
UnmarshalValue 值的反序列化
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
func (*Interface) MarshalJSON ¶
MarshalJSON 序列化json
func (*Interface) UnmarshalJSON ¶
UnmarshalJSON 反序列化json
func (*Interface) UnmarshalValue ¶
UnmarshalValue 反序列化值
type String ¶
type String struct {
// contains filtered or unexported fields
}
func (*String) MarshalJSON ¶
func (*String) UnmarshalJSON ¶
func (*String) UnmarshalValue ¶
type Uint ¶ added in v0.0.7
type Uint struct {
// contains filtered or unexported fields
}
Uint is a struct for concurrent-safe operation for type uint.
func NewUint ¶ added in v0.0.7
NewUint creates and returns a concurrent-safe object for uint type, with given initial value <value>.
func (*Uint) Add ¶ added in v0.0.7
Add atomically adds <delta> to t.value and returns the new value.
func (*Uint) Clone ¶ added in v0.0.7
Clone clones and returns a new concurrent-safe object for uint type.
func (*Uint) MarshalJSON ¶ added in v0.0.7
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Uint) Set ¶ added in v0.0.7
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Uint) UnmarshalJSON ¶ added in v0.0.7
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Uint) UnmarshalValue ¶ added in v0.0.7
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Uint32 ¶ added in v0.0.7
type Uint32 struct {
// contains filtered or unexported fields
}
Uint32 is a struct for concurrent-safe operation for type uint32.
func NewUint32 ¶ added in v0.0.7
NewUint32 creates and returns a concurrent-safe object for uint32 type, with given initial value <value>.
func (*Uint32) Add ¶ added in v0.0.7
Add atomically adds <delta> to t.value and returns the new value.
func (*Uint32) Clone ¶ added in v0.0.7
Clone clones and returns a new concurrent-safe object for uint32 type.
func (*Uint32) MarshalJSON ¶ added in v0.0.7
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Uint32) Set ¶ added in v0.0.7
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Uint32) UnmarshalJSON ¶ added in v0.0.7
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Uint32) UnmarshalValue ¶ added in v0.0.7
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Uint64 ¶ added in v0.0.7
type Uint64 struct {
// contains filtered or unexported fields
}
Uint64 is a struct for concurrent-safe operation for type uint64.
func NewUint64 ¶ added in v0.0.7
NewUint64 creates and returns a concurrent-safe object for uint64 type, with given initial value <value>.
func (*Uint64) Add ¶ added in v0.0.7
Add atomically adds <delta> to t.value and returns the new value.
func (*Uint64) Clone ¶ added in v0.0.7
Clone clones and returns a new concurrent-safe object for uint64 type.
func (*Uint64) MarshalJSON ¶ added in v0.0.7
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Uint64) Set ¶ added in v0.0.7
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Uint64) UnmarshalJSON ¶ added in v0.0.7
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Uint64) UnmarshalValue ¶ added in v0.0.7
UnmarshalValue is an interface implement which sets any type of value for <v>.