From 359f12db33d45b6ffade0872ddf3652a5c52f4a8 Mon Sep 17 00:00:00 2001 From: Daniel Schalla Date: Sat, 7 Jul 2018 00:32:55 +0200 Subject: 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 --- plugin/plugintest/hooks.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'plugin/plugintest/hooks.go') 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) +} -- cgit v1.2.3-1-g7c22