diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-05-15 13:33:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-15 13:33:47 -0700 |
commit | df6a7f8b19e2381ee57f946d5b184185653b2ee1 (patch) | |
tree | 622ff6b13b23bf4506ea41eb010141930e143815 /plugin/plugintest/key_value_store.go | |
parent | fbbe1f7cefd52a27fd52893509b5365d275f9bee (diff) | |
download | chat-df6a7f8b19e2381ee57f946d5b184185653b2ee1.tar.gz chat-df6a7f8b19e2381ee57f946d5b184185653b2ee1.tar.bz2 chat-df6a7f8b19e2381ee57f946d5b184185653b2ee1.zip |
MM-10249 Adding plugin ability to intercept posts before they reach the DB. (#8791)
* Adding plugin ability to intercept posts before they reach the DB.
* s/envoked/invoked/
Diffstat (limited to 'plugin/plugintest/key_value_store.go')
-rw-r--r-- | plugin/plugintest/key_value_store.go | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/plugin/plugintest/key_value_store.go b/plugin/plugintest/key_value_store.go new file mode 100644 index 000000000..30d60d708 --- /dev/null +++ b/plugin/plugintest/key_value_store.go @@ -0,0 +1,70 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +// Regenerate this file using `make plugin-mocks`. + +package plugintest + +import mock "github.com/stretchr/testify/mock" +import model "github.com/mattermost/mattermost-server/model" + +// KeyValueStore is an autogenerated mock type for the KeyValueStore type +type KeyValueStore struct { + mock.Mock +} + +// Delete provides a mock function with given fields: key +func (_m *KeyValueStore) Delete(key string) *model.AppError { + ret := _m.Called(key) + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// Get provides a mock function with given fields: key +func (_m *KeyValueStore) Get(key string) ([]byte, *model.AppError) { + ret := _m.Called(key) + + var r0 []byte + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(key) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// Set provides a mock function with given fields: key, value +func (_m *KeyValueStore) Set(key string, value []byte) *model.AppError { + ret := _m.Called(key, value) + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { + r0 = rf(key, value) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} |