Documentation ¶
Overview ¶
Package gtype 提供高性能且并发安全的基本变量类型。
Index ¶
- type Bool
- func (v *Bool) Cas(old, new bool) (swapped bool)
- func (v *Bool) Clone() *Bool
- func (v *Bool) DeepCopy() interface{}
- func (v Bool) MarshalJSON() ([]byte, error)
- func (v *Bool) String() string
- func (v *Bool) UnmarshalJSON(b []byte) error
- func (v *Bool) UnmarshalValue(value interface{}) error
- func (v *Bool) X取值() bool
- func (v *Bool) X设置值(value bool) (old bool)
- type Byte
- func (v *Byte) Add(delta byte) (new byte)
- func (v *Byte) Cas(old, new byte) (swapped bool)
- func (v *Byte) Clone() *Byte
- func (v *Byte) DeepCopy() interface{}
- func (v Byte) MarshalJSON() ([]byte, error)
- func (v *Byte) String() string
- func (v *Byte) UnmarshalJSON(b []byte) error
- func (v *Byte) UnmarshalValue(value interface{}) error
- func (v *Byte) X取值() byte
- func (v *Byte) X设置值(value byte) (old byte)
- type Bytes
- func (v *Bytes) Clone() *Bytes
- func (v *Bytes) DeepCopy() interface{}
- func (v Bytes) MarshalJSON() ([]byte, error)
- func (v *Bytes) String() string
- func (v *Bytes) UnmarshalJSON(b []byte) error
- func (v *Bytes) UnmarshalValue(value interface{}) error
- func (v *Bytes) X取值() []byte
- func (v *Bytes) X设置值(value []byte) (old []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) DeepCopy() interface{}
- func (v Float32) MarshalJSON() ([]byte, error)
- func (v *Float32) String() string
- func (v *Float32) UnmarshalJSON(b []byte) error
- func (v *Float32) UnmarshalValue(value interface{}) error
- func (v *Float32) X取值() float32
- func (v *Float32) X设置值(value float32) (old 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) DeepCopy() interface{}
- func (v Float64) MarshalJSON() ([]byte, error)
- func (v *Float64) String() string
- func (v *Float64) UnmarshalJSON(b []byte) error
- func (v *Float64) UnmarshalValue(value interface{}) error
- func (v *Float64) X取值() float64
- func (v *Float64) X设置值(value float64) (old float64)
- type Int
- func (v *Int) Add(delta int) (new int)
- func (v *Int) Cas(old, new int) (swapped bool)
- func (v *Int) Clone() *Int
- func (v *Int) DeepCopy() interface{}
- func (v Int) MarshalJSON() ([]byte, error)
- func (v *Int) String() string
- func (v *Int) UnmarshalJSON(b []byte) error
- func (v *Int) UnmarshalValue(value interface{}) error
- func (v *Int) X取值() int
- func (v *Int) X设置值(value int) (old int)
- type Int32
- func (v *Int32) Add(delta int32) (new int32)
- func (v *Int32) Cas(old, new int32) (swapped bool)
- func (v *Int32) Clone() *Int32
- func (v *Int32) DeepCopy() interface{}
- func (v Int32) MarshalJSON() ([]byte, error)
- func (v *Int32) String() string
- func (v *Int32) UnmarshalJSON(b []byte) error
- func (v *Int32) UnmarshalValue(value interface{}) error
- func (v *Int32) X取值() int32
- func (v *Int32) X设置值(value int32) (old int32)
- type Int64
- func (v *Int64) Add(delta int64) (new int64)
- func (v *Int64) Cas(old, new int64) (swapped bool)
- func (v *Int64) Clone() *Int64
- func (v *Int64) DeepCopy() interface{}
- func (v Int64) MarshalJSON() ([]byte, error)
- func (v *Int64) String() string
- func (v *Int64) UnmarshalJSON(b []byte) error
- func (v *Int64) UnmarshalValue(value interface{}) error
- func (v *Int64) X取值() int64
- func (v *Int64) X设置值(value int64) (old int64)
- type Interface
- func (v *Interface) Clone() *Interface
- func (v *Interface) DeepCopy() interface{}
- func (v Interface) MarshalJSON() ([]byte, error)
- func (v *Interface) String() string
- func (v *Interface) UnmarshalJSON(b []byte) error
- func (v *Interface) UnmarshalValue(value interface{}) error
- func (v *Interface) X取值() interface{}
- func (v *Interface) X设置值(value interface{}) (old interface{})
- type String
- func (v *String) Clone() *String
- func (v *String) DeepCopy() interface{}
- func (v String) MarshalJSON() ([]byte, error)
- func (v *String) String() string
- func (v *String) UnmarshalJSON(b []byte) error
- func (v *String) UnmarshalValue(value interface{}) error
- func (v *String) X取值() string
- func (v *String) X设置值(value string) (old string)
- 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) DeepCopy() interface{}
- func (v Uint) MarshalJSON() ([]byte, error)
- func (v *Uint) String() string
- func (v *Uint) UnmarshalJSON(b []byte) error
- func (v *Uint) UnmarshalValue(value interface{}) error
- func (v *Uint) X取值() uint
- func (v *Uint) X设置值(value uint) (old 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) DeepCopy() interface{}
- func (v Uint32) MarshalJSON() ([]byte, error)
- func (v *Uint32) String() string
- func (v *Uint32) UnmarshalJSON(b []byte) error
- func (v *Uint32) UnmarshalValue(value interface{}) error
- func (v *Uint32) X取值() uint32
- func (v *Uint32) X设置值(value uint32) (old 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) DeepCopy() interface{}
- func (v Uint64) MarshalJSON() ([]byte, error)
- func (v *Uint64) String() string
- func (v *Uint64) UnmarshalJSON(b []byte) error
- func (v *Uint64) UnmarshalValue(value interface{}) error
- func (v *Uint64) X取值() uint64
- func (v *Uint64) X设置值(value uint64) (old 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) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Bool) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Byte ¶
type Byte struct {
// contains filtered or unexported fields
}
Byte 是一个结构体,用于对 byte 类型进行并发安全操作。
func (Byte) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Byte) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Byte) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Bytes ¶
type Bytes struct {
// contains filtered or unexported fields
}
Bytes 是一个结构体,用于对 []byte 类型进行并发安全操作。
func (Bytes) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Bytes) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Float32 ¶
type Float32 struct {
// contains filtered or unexported fields
}
Float32 是一个结构体,用于对 float32 类型进行并发安全操作。
func NewFloat32 ¶
NewFloat32 创建并返回一个用于 float32 类型的并发安全对象, 其初始值为给定的 `value`。
func (Float32) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Float32) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Float32) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Float64 ¶
type Float64 struct {
// contains filtered or unexported fields
}
Float64 是一个结构体,用于对 float64 类型进行并发安全操作。
func NewFloat64 ¶
NewFloat64 创建并返回一个用于 float64 类型的并发安全对象, 其初始值为给定的 `value`。
func (Float64) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Float64) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Float64) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int 是一个结构体,用于对 int 类型进行并发安全操作。
func (Int) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Int) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Int) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
Int32 是一个结构体,用于对 int32 类型进行并发安全操作。
func (Int32) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Int32) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Int32) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
Int64 是一个结构体,用于对 int64 类型进行并发安全操作。
func (Int64) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Int64) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Int64) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
Interface 是一个结构体,用于对 interface{} 类型进行并发安全操作。
func NewInterface ¶
func NewInterface(value ...interface{}) *Interface
NewInterface 创建并返回一个对 interface{} 类型安全的并发对象, 其初始值为给定的 `value`。
func (Interface) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Interface) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Interface) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type String ¶
type String struct {
// contains filtered or unexported fields
}
String 是一个结构体,用于对字符串类型进行并发安全操作。
func (String) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*String) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*String) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Uint ¶
type Uint struct {
// contains filtered or unexported fields
}
Uint 是一个结构体,用于并发安全地操作 uint 类型。
func (Uint) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Uint) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Uint) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Uint32 ¶
type Uint32 struct {
// contains filtered or unexported fields
}
Uint32 是一个结构体,用于对 uint32 类型进行并发安全操作。
func (Uint32) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Uint32) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Uint32) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。
type Uint64 ¶
type Uint64 struct {
// contains filtered or unexported fields
}
Uint64 是一个结构体,用于对 uint64 类型进行并发安全操作。
func (Uint64) MarshalJSON ¶
MarshalJSON 实现了 json.Marshal 接口所需的 MarshalJSON 方法。
func (*Uint64) UnmarshalJSON ¶
UnmarshalJSON 实现了 json.Unmarshal 接口的 UnmarshalJSON 方法。
func (*Uint64) UnmarshalValue ¶
UnmarshalValue 是一个接口实现,用于为 `v` 设置任意类型的值。