Documentation ¶
Index ¶
- func GoTimeToTS(t time.Time) uint64
- func ParseTSString(ts string) (uint64, error)
- func TSOToTS(tso uint64) int64
- func TSToTSO(ts int64) uint64
- type GenericConfig
- func (c *GenericConfig) DeepCopy() *GenericConfig
- func (c *GenericConfig) DeepCopyInto(out *GenericConfig)
- func (c *GenericConfig) DeepCopyJsonObject() *GenericConfig
- func (c *GenericConfig) Del(key string)
- func (c *GenericConfig) Get(key string) (value *Value)
- func (c *GenericConfig) Inner() map[string]interface{}
- func (c *GenericConfig) MarshalJSON() ([]byte, error)
- func (c *GenericConfig) MarshalTOML() ([]byte, error)
- func (c *GenericConfig) Set(key string, value interface{})
- func (c *GenericConfig) SetIfNil(key string, value interface{})
- func (c *GenericConfig) SetTable(table string, kvs ...interface{})
- func (c *GenericConfig) UnmarshalJSON(data []byte) error
- func (c *GenericConfig) UnmarshalTOML(data []byte) error
- type Value
- func (v *Value) AsFloat() (float64, error)
- func (v *Value) AsInt() (int64, error)
- func (v *Value) AsString() (string, error)
- func (v *Value) AsStringSlice() ([]string, error)
- func (v *Value) Interface() interface{}
- func (v *Value) MustFloat() float64
- func (v *Value) MustInt() int64
- func (v *Value) MustString() string
- func (v *Value) MustStringSlice() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoTimeToTS ¶ added in v1.4.0
GoTimeToTS converts a Go time to uint64 timestamp. port from tidb.
func ParseTSString ¶ added in v1.4.0
ParseTSString supports TSO or datetime, e.g. '400036290571534337', '2006-01-02 15:04:05'
Types ¶
type GenericConfig ¶
type GenericConfig struct { // Export this field to make "apiequality.Semantic.DeepEqual" happy now. // User of GenericConfig should not directly access this field. MP map[string]interface{} }
func New ¶
func New(o map[string]interface{}) *GenericConfig
func (*GenericConfig) DeepCopy ¶
func (c *GenericConfig) DeepCopy() *GenericConfig
func (*GenericConfig) DeepCopyInto ¶
func (c *GenericConfig) DeepCopyInto(out *GenericConfig)
func (*GenericConfig) DeepCopyJsonObject ¶
func (c *GenericConfig) DeepCopyJsonObject() *GenericConfig
func (*GenericConfig) Del ¶
func (c *GenericConfig) Del(key string)
func (*GenericConfig) Get ¶
func (c *GenericConfig) Get(key string) (value *Value)
func (*GenericConfig) Inner ¶
func (c *GenericConfig) Inner() map[string]interface{}
func (*GenericConfig) MarshalJSON ¶
func (c *GenericConfig) MarshalJSON() ([]byte, error)
func (*GenericConfig) MarshalTOML ¶
func (c *GenericConfig) MarshalTOML() ([]byte, error)
func (*GenericConfig) Set ¶
func (c *GenericConfig) Set(key string, value interface{})
func (*GenericConfig) SetIfNil ¶
func (c *GenericConfig) SetIfNil(key string, value interface{})
func (*GenericConfig) SetTable ¶
func (c *GenericConfig) SetTable(table string, kvs ...interface{})
SetTable set multiple KV of a table
For example: c.SetTable("root", "key1", "val1", "key2", 10)
Invalid KV will will be ignored
func (*GenericConfig) UnmarshalJSON ¶
func (c *GenericConfig) UnmarshalJSON(data []byte) error
func (*GenericConfig) UnmarshalTOML ¶
func (c *GenericConfig) UnmarshalTOML(data []byte) error
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (*Value) AsStringSlice ¶
func (*Value) MustString ¶
func (*Value) MustStringSlice ¶
Click to show internal directories.
Click to hide internal directories.