Documentation ¶
Index ¶
- Constants
- Variables
- type Args
- type ArgsBuilder
- type BoolResult
- type Client
- func (c *Client) Append(ctx context.Context, key string, value any) *IntResult
- func (c *Client) Auth(ctx context.Context, password string) *BoolResult
- func (c *Client) BLPop(ctx context.Context, keys []string, timeout time.Duration) *KeyValueResult
- func (c *Client) BRPop(ctx context.Context, keys []string, timeout time.Duration) *KeyValueResult
- func (c *Client) BRPopLPush(ctx context.Context, source string, destination string, timeout int) *StringResult
- func (c *Client) BitCount(ctx context.Context, key string, startAndEnd ...int64) *IntResult
- func (c *Client) Call(ctx context.Context, args Args, parser Parser) error
- func (c *Client) Close()
- func (c *Client) Decr(ctx context.Context, key string) *IntResult
- func (c *Client) DecrBy(ctx context.Context, key string, decrement int64) *IntResult
- func (c *Client) Del(ctx context.Context, keys ...string) *IntResult
- func (c *Client) DelCtx(ctx context.Context, keys ...string) *IntResult
- func (c *Client) Dump(ctx context.Context, key string) *StringResult
- func (c *Client) Echo(ctx context.Context, message string) *StringResult
- func (c *Client) Exists(ctx context.Context, keys ...string) *IntResult
- func (c *Client) ExistsCtx(ctx context.Context, keys ...string) *IntResult
- func (c *Client) Expire(ctx context.Context, key string, expiration time.Duration) *BoolResult
- func (c *Client) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolResult
- func (c *Client) Get(ctx context.Context, key string) *StringResult
- func (c *Client) GetBit(ctx context.Context, key string, offset int) *IntResult
- func (c *Client) GetRange(ctx context.Context, key string, start, end int) *StringResult
- func (c *Client) GetSet(ctx context.Context, key string, value any) *StringResult
- func (c *Client) HDel(ctx context.Context, key string, fields ...string) *IntResult
- func (c *Client) HExists(ctx context.Context, key string, field string) *BoolResult
- func (c *Client) HGet(ctx context.Context, key string, field string) *StringResult
- func (c *Client) HGetAll(ctx context.Context, key string) *StringMapResult
- func (c *Client) HGetAllMap(ctx context.Context, key string) *StringMapResult
- func (c *Client) HGetMulti(ctx context.Context, key string, fields ...string) *StringMapResult
- func (c *Client) HIncrBy(ctx context.Context, key string, field string, increment int) *IntResult
- func (c *Client) HIncrByFloat(ctx context.Context, key string, field string, increment float64) *FloatResult
- func (c *Client) HKeys(ctx context.Context, key string) *StringSliceResult
- func (c *Client) HLen(ctx context.Context, key string) *IntResult
- func (c *Client) HMGet(ctx context.Context, key string, fields ...string) *StringSliceResult
- func (c *Client) HMSet(ctx context.Context, key string, values map[string]string) *BoolResult
- func (c *Client) HScan(ctx context.Context, key string, cursor int, match string, count int) *ScanResult
- func (c *Client) HSet(ctx context.Context, key string, field string, value any) *BoolResult
- func (c *Client) HSetMulti(ctx context.Context, key string, values map[string]string) *BoolResult
- func (c *Client) HSetNX(ctx context.Context, key string, field string, value any) *BoolResult
- func (c *Client) HStrLen(ctx context.Context, key string, field string) *IntResult
- func (c *Client) HVals(ctx context.Context, key string) *StringSliceResult
- func (c *Client) Incr(ctx context.Context, key string) *IntResult
- func (c *Client) IncrBy(ctx context.Context, key string, increment int64) *IntResult
- func (c *Client) IncrByFloat(ctx context.Context, key string, increment float64) *FloatResult
- func (c *Client) Keys(ctx context.Context, pattern string) *StringSliceResult
- func (c *Client) LIndex(ctx context.Context, key string, index int) *StringResult
- func (c *Client) LInsert(ctx context.Context, key string, pivot any, value any) *IntResult
- func (c *Client) LInsertAfter(ctx context.Context, key string, pivot any, value any) *IntResult
- func (c *Client) LInsertBefore(ctx context.Context, key string, pivot any, value any) *IntResult
- func (c *Client) LLen(ctx context.Context, key string) *IntResult
- func (c *Client) LPop(ctx context.Context, key string) *StringResult
- func (c *Client) LPush(ctx context.Context, key string, values ...any) *IntResult
- func (c *Client) LPushX(ctx context.Context, key string, values ...any) *IntResult
- func (c *Client) LRange(ctx context.Context, key string, start, stop int) *StringSliceResult
- func (c *Client) LRem(ctx context.Context, key string, count int, value any) *IntResult
- func (c *Client) LSet(ctx context.Context, key string, index int, value any) *BoolResult
- func (c *Client) LTrim(ctx context.Context, key string, start, stop int) *BoolResult
- func (c *Client) MGet(ctx context.Context, key string, keys ...string) *StringSliceResult
- func (c *Client) MSet(ctx context.Context, key string, value any, keysValues ...any) *BoolResult
- func (c *Client) MSetNX(ctx context.Context, key string, value any, keysValues ...any) *BoolResult
- func (c *Client) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *BoolResult
- func (c *Client) Move(ctx context.Context, key string, db int) *BoolResult
- func (c *Client) ObjectEncoding(ctx context.Context, key string) *StringResult
- func (c *Client) ObjectIdleTime(ctx context.Context, key string) *DurationResult
- func (c *Client) ObjectRefCount(ctx context.Context, key string) *IntResult
- func (c *Client) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolResult
- func (c *Client) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolResult
- func (c *Client) PSetEX(ctx context.Context, key string, value any, expiration time.Duration) *BoolResult
- func (c *Client) PTTL(ctx context.Context, key string) *DurationResult
- func (c *Client) Persist(ctx context.Context, key string) *BoolResult
- func (c *Client) Ping(ctx context.Context) *StringResult
- func (c *Client) Quit(ctx context.Context) *StringResult
- func (c *Client) RPop(ctx context.Context, key string) *StringResult
- func (c *Client) RPopLPush(ctx context.Context, source, destination string) *StringResult
- func (c *Client) RPush(ctx context.Context, key string, values ...any) *IntResult
- func (c *Client) RPushX(ctx context.Context, key string, values ...any) *IntResult
- func (c *Client) RandomKey(ctx context.Context) *StringResult
- func (c *Client) Rename(ctx context.Context, key, newKey string) *BoolResult
- func (c *Client) RenameNX(ctx context.Context, key, newKey string) *BoolResult
- func (c *Client) Restore(ctx context.Context, key string, ttl time.Duration, value string) *BoolResult
- func (c *Client) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *BoolResult
- func (c *Client) SAdd(ctx context.Context, key string, member any, members ...any) *IntResult
- func (c *Client) SCard(ctx context.Context, key string) *IntResult
- func (c *Client) SDiff(ctx context.Context, keys ...string) *StringSliceResult
- func (c *Client) SDiffStore(ctx context.Context, destination string, keys ...string) *IntResult
- func (c *Client) SInter(ctx context.Context, keys ...string) *StringSliceResult
- func (c *Client) SInterStore(ctx context.Context, destination string, keys ...string) *IntResult
- func (c *Client) SIsMember(ctx context.Context, key string, member any) *BoolResult
- func (c *Client) SMembers(ctx context.Context, key string) *StringSliceResult
- func (c *Client) SMove(ctx context.Context, source, destination string, member any) *BoolResult
- func (c *Client) SPop(ctx context.Context, key string) *StringResult
- func (c *Client) SRem(ctx context.Context, key string, member any, members ...any) *IntResult
- func (c *Client) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanResult
- func (c *Client) SUnion(ctx context.Context, keys ...string) *StringSliceResult
- func (c *Client) SUnionStore(ctx context.Context, destination string, keys ...string) *IntResult
- func (c *Client) Select(ctx context.Context, index int) *StringResult
- func (c *Client) Set(ctx context.Context, key string, value any, expireIn time.Duration) *BoolResult
- func (c *Client) SetBit(ctx context.Context, key string, offset int, value int64) *IntResult
- func (c *Client) SetEX(ctx context.Context, key string, value any, expiration time.Duration) *BoolResult
- func (c *Client) SetNX(ctx context.Context, key string, value any) *BoolResult
- func (c *Client) SetRange(ctx context.Context, key string, offset int, value any) *IntResult
- func (c *Client) SetXX(ctx context.Context, key string, value any) *BoolResult
- func (c *Client) StrLen(ctx context.Context, key string) *IntResult
- func (c *Client) SwapDB(ctx context.Context, index1, index2 int) *StringResult
- func (c *Client) Unlink(ctx context.Context, keys ...string) *IntResult
- func (c *Client) UnlinkCtx(ctx context.Context, keys ...string) *IntResult
- func (c *Client) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntResult
- type DurationResult
- type FloatResult
- type FloatsParser
- type IntResult
- type IntegersParser
- type KeyValueParser
- type KeyValueResult
- type OptionFunc
- func WithAddr(addr string) OptionFunc
- func WithDB(db int) OptionFunc
- func WithDialer(dialer func(ctx context.Context, network, addr string) (net.Conn, error)) OptionFunc
- func WithMaxConnAge(maxConnAge time.Duration) OptionFunc
- func WithMaxRetries(maxRetries int) OptionFunc
- func WithNetwork(network string) OptionFunc
- func WithOnClose(onClose func(ctx context.Context, cn net.Conn)) OptionFunc
- func WithOnConnect(onConnect func(ctx context.Context, cn net.Conn)) OptionFunc
- func WithPassword(password string) OptionFunc
- func WithPoolSize(poolSize int) OptionFunc
- func WithPoolTimeout(poolTimeout time.Duration) OptionFunc
- func WithUsername(username string) OptionFunc
- type Options
- type Parser
- type ProtocolParser
- type ScanParser
- type ScanResult
- type Scanner
- type StringMapParser
- type StringMapResult
- type StringParser
- type StringResult
- func (s StringResult) Bool() (bool, error)
- func (s StringResult) Bytes() ([]byte, error)
- func (s StringResult) Err() error
- func (s StringResult) Float64() (float64, error)
- func (s StringResult) Int() (int, error)
- func (s StringResult) Int64() (int64, error)
- func (s StringResult) MarshalJSON() ([]byte, error)
- func (s StringResult) Result() (string, error)
- func (s StringResult) Scan(v any) error
- func (s StringResult) String() string
- func (s StringResult) Uint64() (uint64, error)
- func (s StringResult) UnmarshalJSON(data []byte) error
- type StringSliceParser
- type StringSliceResult
Constants ¶
View Source
const ( ErrorReply = '-' StatusReply = '+' IntReply = ':' StringReply = '$' ArrayReply = '*' )
Variables ¶
View Source
var ( // ErrInvalidReply is returned when the reply is not valid. ErrInvalidReply = errors.New("invalid reply type") // ErrLineTooLong is returned when the reply line is too long. ErrLineTooLong = errors.New("line too long") // ErrNil indicates that a reply value is nil. ErrNil = errors.New("nil returned") // ErrBadConn indicates that the netConn is bad. ErrBadConn = errors.New("bad netConn") // ErrPoolTimeout indicates that the pool is timeout. ErrPoolTimeout = errors.New("pool timeout") )
Functions ¶
This section is empty.
Types ¶
type ArgsBuilder ¶ added in v1.0.0
ArgsBuilder is a builder for Args.
func (*ArgsBuilder) Build ¶ added in v1.0.0
func (s *ArgsBuilder) Build(ctx context.Context, args Args) error
Build builds args with resp protocol.
func (*ArgsBuilder) WriteArgs ¶ added in v1.0.0
func (s *ArgsBuilder) WriteArgs(args Args) error
WriteArgs writes args with resp protocol.
type BoolResult ¶
type BoolResult struct {
// contains filtered or unexported fields
}
func (BoolResult) Bool ¶
func (b BoolResult) Bool() bool
func (BoolResult) Err ¶ added in v1.0.0
func (b BoolResult) Err() error
func (BoolResult) Result ¶ added in v1.0.0
func (b BoolResult) Result() (bool, error)
func (BoolResult) String ¶ added in v1.0.0
func (b BoolResult) String() string
type Client ¶
type Client struct { Dialer func(ctx context.Context) (net.Conn, error) // contains filtered or unexported fields }
func NewClientWithOption ¶ added in v1.0.0
func (*Client) Auth ¶ added in v1.0.0
func (c *Client) Auth(ctx context.Context, password string) *BoolResult
func (*Client) BRPopLPush ¶ added in v1.0.0
func (*Client) Dump ¶ added in v1.0.0
func (c *Client) Dump(ctx context.Context, key string) *StringResult
func (*Client) Echo ¶ added in v1.0.0
func (c *Client) Echo(ctx context.Context, message string) *StringResult
func (*Client) HGetAll ¶ added in v1.0.0
func (c *Client) HGetAll(ctx context.Context, key string) *StringMapResult
func (*Client) HGetAllMap ¶ added in v1.0.0
func (c *Client) HGetAllMap(ctx context.Context, key string) *StringMapResult
func (*Client) HIncrByFloat ¶ added in v1.0.0
func (*Client) HKeys ¶ added in v1.0.0
func (c *Client) HKeys(ctx context.Context, key string) *StringSliceResult
func (*Client) HVals ¶ added in v1.0.0
func (c *Client) HVals(ctx context.Context, key string) *StringSliceResult
func (*Client) IncrByFloat ¶ added in v1.0.0
func (*Client) Keys ¶ added in v1.0.0
func (c *Client) Keys(ctx context.Context, pattern string) *StringSliceResult
func (*Client) LInsertAfter ¶ added in v1.0.0
func (*Client) LInsertBefore ¶ added in v1.0.0
func (*Client) LPop ¶ added in v1.0.0
func (c *Client) LPop(ctx context.Context, key string) *StringResult
func (*Client) ObjectEncoding ¶ added in v1.0.0
func (c *Client) ObjectEncoding(ctx context.Context, key string) *StringResult
func (*Client) ObjectIdleTime ¶ added in v1.0.0
func (c *Client) ObjectIdleTime(ctx context.Context, key string) *DurationResult
func (*Client) ObjectRefCount ¶ added in v1.0.0
func (*Client) PTTL ¶ added in v1.0.0
func (c *Client) PTTL(ctx context.Context, key string) *DurationResult
func (*Client) Persist ¶ added in v1.0.0
func (c *Client) Persist(ctx context.Context, key string) *BoolResult
func (*Client) RPop ¶ added in v1.0.0
func (c *Client) RPop(ctx context.Context, key string) *StringResult
func (*Client) RPopLPush ¶ added in v1.0.0
func (c *Client) RPopLPush(ctx context.Context, source, destination string) *StringResult
func (*Client) RandomKey ¶ added in v1.0.0
func (c *Client) RandomKey(ctx context.Context) *StringResult
func (*Client) Rename ¶ added in v1.0.0
func (c *Client) Rename(ctx context.Context, key, newKey string) *BoolResult
func (*Client) RenameNX ¶ added in v1.0.0
func (c *Client) RenameNX(ctx context.Context, key, newKey string) *BoolResult
func (*Client) RestoreReplace ¶ added in v1.0.0
func (*Client) SDiff ¶ added in v1.0.0
func (c *Client) SDiff(ctx context.Context, keys ...string) *StringSliceResult
func (*Client) SDiffStore ¶ added in v1.0.0
func (*Client) SInter ¶ added in v1.0.0
func (c *Client) SInter(ctx context.Context, keys ...string) *StringSliceResult
func (*Client) SInterStore ¶ added in v1.0.0
func (*Client) SMembers ¶ added in v1.0.0
func (c *Client) SMembers(ctx context.Context, key string) *StringSliceResult
func (*Client) SPop ¶ added in v1.0.0
func (c *Client) SPop(ctx context.Context, key string) *StringResult
func (*Client) SUnion ¶ added in v1.0.0
func (c *Client) SUnion(ctx context.Context, keys ...string) *StringSliceResult
func (*Client) SUnionStore ¶ added in v1.0.0
func (*Client) Select ¶ added in v1.0.0
func (c *Client) Select(ctx context.Context, index int) *StringResult
func (*Client) SwapDB ¶ added in v1.0.0
func (c *Client) SwapDB(ctx context.Context, index1, index2 int) *StringResult
type DurationResult ¶ added in v1.0.0
type DurationResult struct {
// contains filtered or unexported fields
}
func (DurationResult) Duration ¶ added in v1.0.0
func (d DurationResult) Duration() time.Duration
func (DurationResult) Err ¶ added in v1.0.0
func (d DurationResult) Err() error
type FloatResult ¶
type FloatResult struct {
// contains filtered or unexported fields
}
func (FloatResult) Err ¶ added in v1.0.0
func (f FloatResult) Err() error
func (FloatResult) Float64 ¶
func (f FloatResult) Float64() float64
func (FloatResult) Result ¶ added in v1.0.0
func (f FloatResult) Result() (float64, error)
func (FloatResult) Scan ¶ added in v1.0.0
func (f FloatResult) Scan(v any) error
func (FloatResult) String ¶ added in v1.0.0
func (f FloatResult) String() string
type FloatsParser ¶ added in v1.0.0
type FloatsParser struct {
// contains filtered or unexported fields
}
func (*FloatsParser) FloatResult ¶ added in v1.0.0
func (f *FloatsParser) FloatResult() *FloatResult
func (*FloatsParser) SetErr ¶ added in v1.0.0
func (f *FloatsParser) SetErr(err error)
type IntegersParser ¶ added in v1.0.0
type IntegersParser struct {
// contains filtered or unexported fields
}
func (*IntegersParser) BoolResult ¶ added in v1.0.0
func (i *IntegersParser) BoolResult() *BoolResult
func (*IntegersParser) DurationResult ¶ added in v1.0.0
func (i *IntegersParser) DurationResult() *DurationResult
func (*IntegersParser) IntResult ¶ added in v1.0.0
func (i *IntegersParser) IntResult() *IntResult
func (*IntegersParser) SetErr ¶ added in v1.0.0
func (i *IntegersParser) SetErr(err error)
type KeyValueParser ¶ added in v1.0.0
type KeyValueParser struct {
// contains filtered or unexported fields
}
func (*KeyValueParser) KeyValueResult ¶ added in v1.0.0
func (k *KeyValueParser) KeyValueResult() *KeyValueResult
func (*KeyValueParser) SetErr ¶ added in v1.0.0
func (k *KeyValueParser) SetErr(err error)
type KeyValueResult ¶ added in v1.0.0
type KeyValueResult struct {
// contains filtered or unexported fields
}
func (KeyValueResult) Err ¶ added in v1.0.0
func (kv KeyValueResult) Err() error
func (KeyValueResult) Key ¶ added in v1.0.0
func (kv KeyValueResult) Key() string
func (KeyValueResult) Result ¶ added in v1.0.0
func (kv KeyValueResult) Result() (string, string, error)
func (KeyValueResult) String ¶ added in v1.0.0
func (kv KeyValueResult) String() string
func (KeyValueResult) Value ¶ added in v1.0.0
func (kv KeyValueResult) Value() string
type OptionFunc ¶ added in v1.0.0
type OptionFunc func(*Options)
func WithAddr ¶ added in v1.0.0
func WithAddr(addr string) OptionFunc
func WithDB ¶ added in v1.0.0
func WithDB(db int) OptionFunc
func WithDialer ¶ added in v1.0.0
func WithMaxConnAge ¶ added in v1.0.0
func WithMaxConnAge(maxConnAge time.Duration) OptionFunc
func WithMaxRetries ¶ added in v1.0.0
func WithMaxRetries(maxRetries int) OptionFunc
func WithNetwork ¶ added in v1.0.0
func WithNetwork(network string) OptionFunc
func WithOnClose ¶ added in v1.0.0
func WithOnClose(onClose func(ctx context.Context, cn net.Conn)) OptionFunc
func WithOnConnect ¶ added in v1.0.0
func WithOnConnect(onConnect func(ctx context.Context, cn net.Conn)) OptionFunc
func WithPassword ¶ added in v1.0.0
func WithPassword(password string) OptionFunc
func WithPoolSize ¶ added in v1.0.0
func WithPoolSize(poolSize int) OptionFunc
func WithPoolTimeout ¶ added in v1.0.0
func WithPoolTimeout(poolTimeout time.Duration) OptionFunc
func WithUsername ¶ added in v1.0.0
func WithUsername(username string) OptionFunc
type Options ¶
type Options struct { // Addr is the TCP address of the Redis server. // The address must be in the form "host:port". // If no port is specified, then 6379 is used. // If no host is specified, then "localhost" is used. // To use a Unix domain socket, provide a path to a socket file. Addr string // Network is the type of network to use. // It must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket". // Default is "tcp". Network string // Dialer is an optional dialer for creating TCP connections. // If Dialer is nil, then net.Dialer is used. Dialer func(ctx context.Context, network, addr string) (net.Conn, error) // OnConnect is an optional hook executed when a new connection is established. // It receives a context and a connection. It is safe for OnConnect to read and // write to the connection. OnConnect func(ctx context.Context, cn net.Conn) // OnClose is an optional hook executed when a connection is closed. // It receives a context and a connection. It is safe for OnClose to read and // write to the connection. OnClose func(ctx context.Context, cn net.Conn) // Username is the username for AUTH (requires Redis 6 or above). Username string // Password is the password for AUTH (requires Redis 6 or above). Password string // DB is the Redis database to select. DB int // MaxRetries specifies the maximum number of retries before giving up. // Default is 3 retries. MaxRetries int // PoolSize is the maximum number of socket connections. // Default is 2 * runtime.NumCPU. PoolSize int32 // MaxConnAge is the maximum amount of time a connection may be reused. // Expired connections may be closed lazily before reuse. // If the value is zero, then connections are reused forever. MaxConnAge time.Duration // PoolTimeout is the amount of time client waits for connection if all // connections are busy before returning an error. // If the value is zero and there are no idle connections, then // ErrPoolTimeout is returned. PoolTimeout time.Duration // IdleTimeout is the maximum amount of time an idle connection may remain idle // before closing itself. // If the value is zero, then idle connections are not closed. IdleTimeout time.Duration }
type ProtocolParser ¶ added in v1.0.0
type ProtocolParser struct {
// contains filtered or unexported fields
}
func NewProtocolParser ¶ added in v1.0.0
func NewProtocolParser(reader io.Reader) *ProtocolParser
func (ProtocolParser) Parse ¶ added in v1.0.0
func (p ProtocolParser) Parse() ([]byte, error)
type ScanParser ¶ added in v1.0.0
type ScanParser struct {
// contains filtered or unexported fields
}
func (*ScanParser) Scan ¶ added in v1.0.0
func (s *ScanParser) Scan() (cursor uint64, keys []string, err error)
func (*ScanParser) ScanResult ¶ added in v1.0.0
func (s *ScanParser) ScanResult() *ScanResult
func (*ScanParser) SetErr ¶ added in v1.0.0
func (s *ScanParser) SetErr(err error)
type ScanResult ¶ added in v1.0.0
type ScanResult struct {
// contains filtered or unexported fields
}
func (ScanResult) Cursor ¶ added in v1.0.0
func (s ScanResult) Cursor() uint64
func (ScanResult) Err ¶ added in v1.0.0
func (s ScanResult) Err() error
func (ScanResult) Values ¶ added in v1.0.0
func (s ScanResult) Values() []string
type StringMapParser ¶ added in v1.0.0
type StringMapParser struct {
// contains filtered or unexported fields
}
func (*StringMapParser) SetErr ¶ added in v1.0.0
func (s *StringMapParser) SetErr(err error)
func (*StringMapParser) StringMap ¶ added in v1.0.0
func (s *StringMapParser) StringMap() map[string]string
func (*StringMapParser) StringMapResult ¶ added in v1.0.0
func (s *StringMapParser) StringMapResult() *StringMapResult
type StringMapResult ¶ added in v1.0.0
type StringMapResult struct {
// contains filtered or unexported fields
}
func (StringMapResult) Err ¶ added in v1.0.0
func (s StringMapResult) Err() error
func (StringMapResult) Result ¶ added in v1.0.0
func (s StringMapResult) Result() (map[string]string, error)
func (StringMapResult) Scan ¶ added in v1.0.0
func (s StringMapResult) Scan(v any) error
func (StringMapResult) StringMap ¶ added in v1.0.0
func (s StringMapResult) StringMap() map[string]string
type StringParser ¶ added in v1.0.0
type StringParser struct {
// contains filtered or unexported fields
}
StringParser implement
func (*StringParser) BoolResult ¶ added in v1.0.0
func (s *StringParser) BoolResult() *BoolResult
func (*StringParser) SetErr ¶ added in v1.0.0
func (s *StringParser) SetErr(err error)
func (*StringParser) String ¶ added in v1.0.0
func (s *StringParser) String() string
func (*StringParser) StringResult ¶ added in v1.0.0
func (s *StringParser) StringResult() *StringResult
type StringResult ¶
type StringResult struct {
// contains filtered or unexported fields
}
func (StringResult) Bool ¶ added in v1.0.0
func (s StringResult) Bool() (bool, error)
func (StringResult) Bytes ¶ added in v1.0.0
func (s StringResult) Bytes() ([]byte, error)
func (StringResult) Err ¶ added in v1.0.0
func (s StringResult) Err() error
func (StringResult) Float64 ¶ added in v1.0.0
func (s StringResult) Float64() (float64, error)
func (StringResult) Int ¶ added in v1.0.0
func (s StringResult) Int() (int, error)
func (StringResult) Int64 ¶ added in v1.0.0
func (s StringResult) Int64() (int64, error)
func (StringResult) MarshalJSON ¶ added in v1.0.0
func (s StringResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (StringResult) Result ¶ added in v1.0.0
func (s StringResult) Result() (string, error)
func (StringResult) Scan ¶ added in v1.0.0
func (s StringResult) Scan(v any) error
func (StringResult) String ¶
func (s StringResult) String() string
func (StringResult) Uint64 ¶ added in v1.0.0
func (s StringResult) Uint64() (uint64, error)
func (StringResult) UnmarshalJSON ¶ added in v1.0.0
func (s StringResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type StringSliceParser ¶ added in v1.0.0
type StringSliceParser struct {
// contains filtered or unexported fields
}
func (*StringSliceParser) SetErr ¶ added in v1.0.0
func (s *StringSliceParser) SetErr(err error)
func (*StringSliceParser) StringSliceResult ¶ added in v1.0.0
func (s *StringSliceParser) StringSliceResult() *StringSliceResult
func (*StringSliceParser) Strings ¶ added in v1.0.0
func (s *StringSliceParser) Strings() []string
type StringSliceResult ¶ added in v1.0.0
type StringSliceResult struct {
// contains filtered or unexported fields
}
func (StringSliceResult) Err ¶ added in v1.0.0
func (s StringSliceResult) Err() error
func (StringSliceResult) Result ¶ added in v1.0.0
func (s StringSliceResult) Result() ([]string, error)
func (StringSliceResult) Scan ¶ added in v1.0.0
func (s StringSliceResult) Scan(v any) error
func (StringSliceResult) Strings ¶ added in v1.0.0
func (s StringSliceResult) Strings() []string
Click to show internal directories.
Click to hide internal directories.