[MM-20353] Change KVSetWithOptions to accept a byte slice (#13213)
* Drop EncodeJSON from PluginKVSetOptions * Add unit tests for KVSetWithOptions with nil values
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3543fcce6c
Коммит
d0d6ce0a70
@@ -758,13 +758,12 @@ type API interface {
|
||||
KVCompareAndDelete(key string, oldValue []byte) (bool, *model.AppError)
|
||||
|
||||
// KVSetWithOptions stores a key-value pair, unique per plugin, according to the given options.
|
||||
// If options.EncodeJSON is not true, the type of newValue must be of type []byte.
|
||||
// Returns (false, err) if DB error occurred
|
||||
// Returns (false, nil) if the value was not set
|
||||
// Returns (true, nil) if the value was set
|
||||
//
|
||||
// Minimum server version: 5.18
|
||||
KVSetWithOptions(key string, newValue interface{}, options model.PluginKVSetOptions) (bool, *model.AppError)
|
||||
// Minimum server version: 5.20
|
||||
KVSetWithOptions(key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError)
|
||||
|
||||
// KVSet stores a key-value pair with an expiry time, unique per plugin.
|
||||
//
|
||||
|
||||
Ссылка в новой задаче
Block a user