* MM-33945: Update dependencies

Ran `make update-dependencies`

https://mattermost.atlassian.net/browse/MM-33945

```release-notes
NONE
```

* fix test
Этот коммит содержится в:
Agniva De Sarker
2021-03-25 14:45:13 +05:30
коммит произвёл GitHub
родитель adcddf350e
Коммит b950125d4e
269 изменённых файлов: 14698 добавлений и 7482 удалений

10
vendor/github.com/splitio/go-toolkit/v4/redis/prefixedclient.go сгенерированный поставляемый
Просмотреть файл

@@ -151,6 +151,16 @@ func (p *PrefixedRedisClient) Eval(script string, keys []string, args ...interfa
return p.Client.Eval(script, keys, args...).Err()
}
// HIncrBy implements HIncrBy wrapper for redis
func (p *PrefixedRedisClient) HIncrBy(key string, field string, value int64) (int64, error) {
return p.Client.HIncrBy(p.withPrefix(key), field, value).Result()
}
// HGetAll implements HGetAll wrapper for redis
func (p *PrefixedRedisClient) HGetAll(key string) (map[string]string, error) {
return p.Client.HGetAll(p.withPrefix(key)).MapStringString()
}
// NewPrefixedRedisClient returns a new Prefixed Redis Client
func NewPrefixedRedisClient(redisClient Client, prefix string) (*PrefixedRedisClient, error) {
return &PrefixedRedisClient{

40
vendor/github.com/splitio/go-toolkit/v4/redis/wrapper.go сгенерированный поставляемый
Просмотреть файл

@@ -20,17 +20,19 @@ type Result interface {
Multi() ([]string, error)
MultiInterface() ([]interface{}, error)
Err() error
MapStringString() (map[string]string, error)
}
// ResultImpl generic interface
type ResultImpl struct {
value int64
valueString string
valueBool bool
valueDuration time.Duration
err error
multi []string
multiInterface []interface{}
value int64
valueString string
valueBool bool
valueDuration time.Duration
err error
multi []string
multiInterface []interface{}
mapStringString map[string]string
}
// Int implementation
@@ -78,6 +80,11 @@ func (r *ResultImpl) MultiInterface() ([]interface{}, error) {
return r.multiInterface, r.err
}
// MapStringString implementation
func (r *ResultImpl) MapStringString() (map[string]string, error) {
return r.mapStringString, r.err
}
// ====== Client
// Client interface which specifies the currently used subset of redis operations
@@ -103,6 +110,8 @@ type Client interface {
MGet(keys []string) Result
SCard(key string) Result
Eval(script string, keys []string, args ...interface{}) Result
HIncrBy(key string, field string, value int64) Result
HGetAll(key string) Result
}
// ClientImpl wrapps redis client
@@ -154,6 +163,11 @@ func (c *ClientImpl) wrapResult(result interface{}) Result {
return &ResultImpl{
err: v.Err(),
}
case *redis.StringStringMapCmd:
return &ResultImpl{
err: v.Err(),
mapStringString: v.Val(),
}
default:
return nil
}
@@ -285,6 +299,18 @@ func (c *ClientImpl) Eval(script string, keys []string, args ...interface{}) Res
return c.wrapResult(res)
}
// HIncrBy implements HIncrBy wrapper for redis
func (c *ClientImpl) HIncrBy(key string, field string, value int64) Result {
res := c.wrapped.HIncrBy(context.TODO(), key, field, value)
return c.wrapResult(res)
}
// HGetAll implements HGetAll wrapper for redis
func (c *ClientImpl) HGetAll(key string) Result {
res := c.wrapped.HGetAll(context.TODO(), key)
return c.wrapResult(res)
}
// NewClient returns new client implementation
func NewClient(options *UniversalOptions) (Client, error) {
return &ClientImpl{