Documentation
¶
Index ¶
- type Builder
- type Type
- type Value
- func (v Value) AsBool() bool
- func (v Value) AsFloat64() float64
- func (v Value) AsInt64() int64
- func (v Value) AsInterface() interface{}
- func (v Value) AsString() string
- func (v Value) AsUint64() uint64
- func (v Value) MarshalJSON() ([]byte, error)
- func (v Value) String() string
- func (v Value) Type() Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type int // redefines builtin Type.
Type describes the type of the data Value holds.
const ( // INVALID is used for a Value with no value set. INVALID Type = iota // BOOL is a boolean Type Value. BOOL // INT64 is a 64-bit signed integral Type Value. INT64 // FLOAT64 is a 64-bit floating point Type Value. FLOAT64 // STRING is a string Type Value. STRING // UINT64 is a 64-bit unsigned integral Type Value. // // This type is intentionally not exposed through the Builder API. UINT64 )
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value represents the value part in key-value pairs.
func Uint64Value ¶ added in v0.43.0
Uint64Value creates a UINT64 Value.
This constructor is intentionally not exposed through the Builder API.
func (Value) AsFloat64 ¶
AsFloat64 returns the float64 value. Make sure that the Value's type is FLOAT64.
func (Value) AsInterface ¶
func (v Value) AsInterface() interface{}
AsInterface returns Value's data as interface{}.
func (Value) AsString ¶
AsString returns the string value. Make sure that the Value's type is STRING.
func (Value) AsUint64 ¶ added in v0.43.0
AsUint64 returns the uint64 value. Make sure that the Value's type is UINT64.
func (Value) MarshalJSON ¶
MarshalJSON returns the JSON encoding of the Value.
Click to show internal directories.
Click to hide internal directories.