diff options
author | Charles Kenney <Charlesc.kenney@gmail.com> | 2018-10-17 20:31:51 -0400 |
---|---|---|
committer | Jesse Hallam <jesse.hallam@gmail.com> | 2018-10-17 20:31:51 -0400 |
commit | 3bc89083fca64a1d096cc897f13d0a9b68433a8f (patch) | |
tree | 1a3b8f81f45dd39564f80288fea2ac0970bc75f9 /plugin/plugintest | |
parent | db1123b8b28739ab78e46d8ec21f9aaa00ab520d (diff) | |
download | chat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.tar.gz chat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.tar.bz2 chat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.zip |
Add GetFileLink method to plugin API (#9665)
* add GetFileLink method to plugin API
* Update plugin/api.go
* add translations for new plugin API errors
Diffstat (limited to 'plugin/plugintest')
-rw-r--r-- | plugin/plugintest/api.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index 0fe2ab0ea..78e361e0f 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -574,6 +574,29 @@ func (_m *API) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { return r0, r1 } +// GetFileLink provides a mock function with given fields: fileId +func (_m *API) GetFileLink(fileId string) (string, *model.AppError) { + ret := _m.Called(fileId) + + var r0 string + if rf, ok := ret.Get(0).(func(string) string); ok { + r0 = rf(fileId) + } else { + r0 = ret.Get(0).(string) + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(fileId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + // GetGroupChannel provides a mock function with given fields: userIds func (_m *API) GetGroupChannel(userIds []string) (*model.Channel, *model.AppError) { ret := _m.Called(userIds) |