Versions in this module Expand all Collapse all v0 v0.0.4 Jul 25, 2021 Changes in this version + func CommandExecuteFail(err error) error + func EmptyCmd() error + func FlagNotFound(flag string) error + func LoggerInitFail(flag string, err error) error + func ReceiverISNIL() error + func ResultConvertFail(err error) error + type Client struct + func (c *Client) CommandProxy(ctx *Context, flag string, cmd string, param ...interface{}) (interface{}, error) + func (c *Client) CommandProxyWithReceiver(ctx *Context, flag string, receiver interface{}, cmd string, ...) error + func (c *Client) GetRedisClient(flag string) (*RealClient, error) + type ClientInterface interface + CommandProxy func(ctx *Context, flag string, cmd string, param ...interface{}) (interface{}, error) + CommandProxyWithReceiver func(ctx *Context, flag string, receiver interface{}, cmd string, ...) error + GetRedisClient func(flag string) (*RealClient, error) + func NewClient(config map[string]Options, parseErrorFunc func(err error) error) (ClientInterface, error) + type Context struct + Ctx context.Context + Extra easymap.EasyMap + Flag string + GinCtx *gin.Context + RequestID string + RequestIDField string + func NewContext(flag string, of ...SetContextFunc) *Context + type LogFieldConfig struct + CommandField string + FlagField string + Message string + UsedTimeField string + type LoggerConfig struct + ConsoleOutput bool + Encoder zapcore.Encoder + LoggerFile string + LoggerLevel zapcore.Level + LoggerPath string + SplitConfig *logger.RotateLogConfig + type Options struct + Conf *redisInstance.Options + Logger *LoggerConfig + LoggerFieldConfig *LogFieldConfig + type RealClient struct + Flag string + Instance *redisInstance.Client + Logger *zap.Logger + LoggerFieldConfig *LogFieldConfig + type SetContextFunc func(rc *Context) + func WithCtx(ctx context.Context) SetContextFunc + func WithExtra(extra easymap.EasyMap) SetContextFunc + func WithGinCtx(ginCtx *gin.Context) SetContextFunc + func WithRequestID(requestID string) SetContextFunc + func WithRequestIDField(requestIDField string) SetContextFunc