Documentation
¶
Index ¶
- Constants
- type Config
- type Connector
- type Result
- func (r *Result) Bool() bool
- func (r *Result) Bytes() []byte
- func (r *Result) Float32() float32
- func (r *Result) Float64() float64
- func (r *Result) Int() int
- func (r *Result) Int16() int16
- func (r *Result) Int32() int32
- func (r *Result) Int64() int64
- func (r *Result) Int8() int8
- func (r *Result) JsonDecode(v interface{}) error
- func (r *Result) KvEach(fn func(key, value *Result)) int
- func (r *Result) KvLen() int
- func (rs *Result) KvList() []*ResultEntry
- func (r *Result) List() []*Result
- func (r *Result) NotFound() bool
- func (r *Result) OK() bool
- func (r *Result) String() string
- func (r *Result) Uint() uint
- func (r *Result) Uint16() uint16
- func (r *Result) Uint32() uint32
- func (r *Result) Uint64() uint64
- func (r *Result) Uint8() uint8
- type ResultBytes
- func (rb ResultBytes) Bool() bool
- func (rb ResultBytes) Bytes() []byte
- func (rb ResultBytes) Float32() float32
- func (rb ResultBytes) Float64() float64
- func (rb ResultBytes) Int() int
- func (rb ResultBytes) Int16() int16
- func (rb ResultBytes) Int32() int32
- func (rb ResultBytes) Int64() int64
- func (rb ResultBytes) Int8() int8
- func (rb ResultBytes) JsonDecode(v interface{}) error
- func (rb ResultBytes) String() string
- func (rb ResultBytes) Uint() uint
- func (rb ResultBytes) Uint16() uint16
- func (rb ResultBytes) Uint32() uint32
- func (rb ResultBytes) Uint64() uint64
- func (rb ResultBytes) Uint8() uint8
- type ResultEntry
Constants ¶
View Source
const ( ResultOK uint8 ResultError ResultNotFound ResultBadArgument ResultNoAuth ResultServerError ResultNetworkException ResultTimeout ResultUnknown )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Database server hostname or IP. Leave blank if using unix sockets
Host string `json:"host"`
// Database server port. Leave blank if using unix sockets
Port uint16 `json:"port"`
// Password for authentication
Auth string `json:"auth"`
// A path of a UNIX socket file. Leave blank if using host and port
Socket string `json:"socket"`
// The connection timeout to a redis host (seconds)
Timeout int `json:"timeout"`
// Maximum number of connections
MaxConn int `json:"maxconn"`
}
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
type Result ¶
func (*Result) JsonDecode ¶
func (*Result) KvList ¶
func (rs *Result) KvList() []*ResultEntry
type ResultBytes ¶
type ResultBytes []byte
Universal Bytes
func (ResultBytes) Bool ¶
func (rb ResultBytes) Bool() bool
func (ResultBytes) Bytes ¶
func (rb ResultBytes) Bytes() []byte
func (ResultBytes) Float64 ¶
func (rb ResultBytes) Float64() float64
func (ResultBytes) Int16 ¶
func (rb ResultBytes) Int16() int16
func (ResultBytes) Int32 ¶
func (rb ResultBytes) Int32() int32
func (ResultBytes) Int64 ¶
func (rb ResultBytes) Int64() int64
func (ResultBytes) Int8 ¶
func (rb ResultBytes) Int8() int8
func (ResultBytes) JsonDecode ¶
func (rb ResultBytes) JsonDecode(v interface{}) error
func (ResultBytes) String ¶
func (rb ResultBytes) String() string
func (ResultBytes) Uint16 ¶
func (rb ResultBytes) Uint16() uint16
func (ResultBytes) Uint32 ¶
func (rb ResultBytes) Uint32() uint32
func (ResultBytes) Uint64 ¶
func (rb ResultBytes) Uint64() uint64
func (ResultBytes) Uint8 ¶
func (rb ResultBytes) Uint8() uint8
type ResultEntry ¶
type ResultEntry struct {
Key ResultBytes
Value ResultBytes
}
Click to show internal directories.
Click to hide internal directories.