diff options
author | Daniel Schalla <daniel@schalla.me> | 2018-07-07 00:32:55 +0200 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-07-06 15:32:55 -0700 |
commit | 359f12db33d45b6ffade0872ddf3652a5c52f4a8 (patch) | |
tree | 6c60918089574d5bbc1e5121be276d23ef41773d /plugin/plugintest/hooks.go | |
parent | 4c1ddcff10b359baf5728b334acb60cc3e1b1123 (diff) | |
download | chat-359f12db33d45b6ffade0872ddf3652a5c52f4a8.tar.gz chat-359f12db33d45b6ffade0872ddf3652a5c52f4a8.tar.bz2 chat-359f12db33d45b6ffade0872ddf3652a5c52f4a8.zip |
First batch of new plugin api methods (#9022)
update api mocks
Generated new hooks
ChannelHasJoinedChannel Implementation
User Left Team/Channel Hook; User Joined Team Hook Implementation
Update RPC Client and Mocks
gofmt
go tests fix
Add Config API Methods
codegne
Add Channel Has Been Created Hook
Fix ChannelHasBeenCreated hook
fix missing context param
fix duplicate hooks; remove redudandcy
Diffstat (limited to 'plugin/plugintest/hooks.go')
-rw-r--r-- | plugin/plugintest/hooks.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugin/plugintest/hooks.go b/plugin/plugintest/hooks.go index 94a675cd7..d88792f58 100644 --- a/plugin/plugintest/hooks.go +++ b/plugin/plugintest/hooks.go @@ -14,6 +14,11 @@ type Hooks struct { mock.Mock } +// ChannelHasBeenCreated provides a mock function with given fields: c, channel +func (_m *Hooks) ChannelHasBeenCreated(c *plugin.Context, channel *model.Channel) { + _m.Called(c, channel) +} + // ExecuteCommand provides a mock function with given fields: c, args func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) { ret := _m.Called(c, args) @@ -164,3 +169,23 @@ func (_m *Hooks) OnDeactivate() error { func (_m *Hooks) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) { _m.Called(c, w, r) } + +// UserHasJoinedChannel provides a mock function with given fields: c, channelMember, actor +func (_m *Hooks) UserHasJoinedChannel(c *plugin.Context, channelMember *model.ChannelMember, actor *model.User) { + _m.Called(c, channelMember, actor) +} + +// UserHasJoinedTeam provides a mock function with given fields: c, teamMember, actor +func (_m *Hooks) UserHasJoinedTeam(c *plugin.Context, teamMember *model.TeamMember, actor *model.User) { + _m.Called(c, teamMember, actor) +} + +// UserHasLeftChannel provides a mock function with given fields: c, channelMember, actor +func (_m *Hooks) UserHasLeftChannel(c *plugin.Context, channelMember *model.ChannelMember, actor *model.User) { + _m.Called(c, channelMember, actor) +} + +// UserHasLeftTeam provides a mock function with given fields: c, teamMember, actor +func (_m *Hooks) UserHasLeftTeam(c *plugin.Context, teamMember *model.TeamMember, actor *model.User) { + _m.Called(c, teamMember, actor) +} |