diff --git a/.gitignore b/.gitignore index dbe4b44..e89f7d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ dist/ +bin/ # Mac .DS_Store diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 0000000..16f2b2e --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,8 @@ +quiet: False +with-expecter: true +dir: "server/mocks/{{.PackagePath}}" +packages: + github.com/mattermost/mattermost/server/public/plugin: + config: + interfaces: + API: diff --git a/Makefile b/Makefile index 555a23b..238ada5 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,10 @@ DEFAULT_GOARCH := $(shell go env GOARCH) export GO111MODULE=on +# We need to export GOBIN to allow it to be set +# for processes spawned from the Makefile +export GOBIN ?= $(PWD)/bin + # You can include assets this directory into the bundle. This can be e.g. used to include profile pictures. ASSETS_DIR ?= assets @@ -311,6 +315,12 @@ ifneq ($(HAS_SERVER),) $(GO) tool cover -html=server/coverage.txt endif +## Create plugin server mock files +.PHONY: server-mocks +server-mocks: + $(GO) install github.com/vektra/mockery/v2/...@v2.40.3 + $(GOBIN)/mockery + ## Extract strings for translation from the source code. .PHONY: i18n-extract i18n-extract: diff --git a/go.mod b/go.mod index 2290e60..b3779b6 100644 --- a/go.mod +++ b/go.mod @@ -83,6 +83,7 @@ require ( github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/stretchr/objx v0.5.1 // indirect github.com/tinylib/msgp v1.1.9 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index 0deaf36..8b7eebb 100644 --- a/go.sum +++ b/go.sum @@ -501,6 +501,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -508,7 +510,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= diff --git a/server/calls_targets.go b/server/calls_targets.go new file mode 100644 index 0000000..9aad9da --- /dev/null +++ b/server/calls_targets.go @@ -0,0 +1,94 @@ +package main + +import ( + "context" + "fmt" + "net" + "net/url" + "time" + + promModel "github.com/prometheus/common/model" + + "github.com/mattermost/mattermost/server/public/model" +) + +const ( + callsPluginID = "com.mattermost.calls" +) + +func resolveURL(u string, timeout time.Duration) ([]net.IP, string, error) { + parsed, err := url.Parse(u) + if err != nil { + return nil, "", fmt.Errorf("failed to parse url: %w", err) + } + + host, port, err := net.SplitHostPort(parsed.Host) + if err != nil { + return nil, "", fmt.Errorf("failed to split host/port: %w", err) + } + + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + ips, err := net.DefaultResolver.LookupIP(ctx, "ip4", host) + if err != nil { + return nil, "", fmt.Errorf("failed to lookup ips: %w", err) + } + + return ips, port, nil +} + +func (p *Plugin) generateCallsTargets(appCfg *model.Config, host, port string, nodes []*model.ClusterDiscovery) ([]promModel.LabelSet, error) { + // First, figure out if Calls is running. If so, add the plugin metrics endpoint to the targets. + // Also, check if the external RTCD service is configured, in which case add its endpoints to targets. + status, err := p.API.GetPluginStatus(callsPluginID) + if err != nil { + return nil, fmt.Errorf("generateCallsTargets: failed to get calls plugin status: %w", err) + } + + if status.State != model.PluginStateRunning { + p.API.LogDebug("generateCallsTargets: calls plugin is not running") + return nil, nil + } + + p.API.LogDebug("generateCallsTargets: calls plugin running, generating targets") + + var targets []promModel.LabelSet + if len(nodes) < 2 { + targets = []promModel.LabelSet{ + { + promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(host, port)), + promModel.MetricsPathLabel: promModel.LabelValue(fmt.Sprintf("/plugins/%s/metrics", callsPluginID)), + promModel.JobLabel: "calls", + }, + } + } else { + for i := range nodes { + targets = append(targets, promModel.LabelSet{ + promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(nodes[i].Hostname, port)), + promModel.MetricsPathLabel: promModel.LabelValue(fmt.Sprintf("/plugins/%s/metrics", callsPluginID)), + promModel.JobLabel: "calls", + }) + } + } + + if appCfg.PluginSettings.Plugins[callsPluginID] != nil { + rtcdURL, _ := appCfg.PluginSettings.Plugins[callsPluginID]["rtcdserviceurl"].(string) + if rtcdURL != "" { + // Since RTCD can be DNS load balanced, we need to resolve its hostname to figure out if there's more than a single node behind it. + ips, port, err := resolveURL(rtcdURL, 5*time.Second) + if err != nil { + p.API.LogWarn("generateCallsTargets: failed to resolve rtcd URL", "err", err.Error()) + } + + for _, ip := range ips { + targets = append(targets, promModel.LabelSet{ + promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(ip.String(), port)), + promModel.JobLabel: "calls", + }) + } + } + } + + return targets, nil +} diff --git a/server/calls_targets_test.go b/server/calls_targets_test.go new file mode 100644 index 0000000..f047a54 --- /dev/null +++ b/server/calls_targets_test.go @@ -0,0 +1,134 @@ +package main + +import ( + "net/http" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/plugin" + + promModel "github.com/prometheus/common/model" + + pluginMocks "github.com/mattermost/mattermost-plugin-metrics/server/mocks/github.com/mattermost/mattermost/server/public/plugin" +) + +func TestResolveURL(t *testing.T) { + ips, port, err := resolveURL("https://localhost:8045", time.Second) + require.NoError(t, err) + require.NotEmpty(t, ips) + require.Equal(t, "127.0.0.1", ips[0].String()) + require.Equal(t, "8045", port) + + ips, port, err = resolveURL("http://127.0.0.1:8055", time.Second) + require.NoError(t, err) + require.NotEmpty(t, ips) + require.Equal(t, "127.0.0.1", ips[0].String()) + require.Equal(t, "8055", port) +} + +func TestGenerateCallsTargets(t *testing.T) { + mockAPI := &pluginMocks.MockAPI{} + defer mockAPI.AssertExpectations(t) + + p := Plugin{ + MattermostPlugin: plugin.MattermostPlugin{ + API: mockAPI, + }, + } + + cfg := &model.Config{} + cfg.SetDefaults() + + t.Run("plugin not installed", func(t *testing.T) { + mockAPI.On("GetPluginStatus", callsPluginID).Return(&model.PluginStatus{}, model.NewAppError("GetPluginStatus", "Plugin is not installed.", nil, "", http.StatusNotFound)).Once() + + targets, err := p.generateCallsTargets(cfg, "localhost", "8067", nil) + require.EqualError(t, err, "generateCallsTargets: failed to get calls plugin status: GetPluginStatus: Plugin is not installed.") + require.Empty(t, targets) + }) + + t.Run("plugin not running", func(t *testing.T) { + mockAPI.On("GetPluginStatus", callsPluginID).Return(&model.PluginStatus{ + State: model.PluginStateStarting, + }, nil).Once() + mockAPI.On("LogDebug", "generateCallsTargets: calls plugin is not running").Return().Once() + + targets, err := p.generateCallsTargets(cfg, "localhost", "8067", nil) + require.NoError(t, err) + require.Empty(t, targets) + }) + + t.Run("single node", func(t *testing.T) { + mockAPI.On("GetPluginStatus", callsPluginID).Return(&model.PluginStatus{ + State: model.PluginStateRunning, + }, nil).Once() + mockAPI.On("LogDebug", "generateCallsTargets: calls plugin running, generating targets").Return().Once() + + targets, err := p.generateCallsTargets(cfg, "localhost", "8067", nil) + require.NoError(t, err) + require.Equal(t, []promModel.LabelSet{ + { + promModel.AddressLabel: "localhost:8067", + promModel.MetricsPathLabel: "/plugins/com.mattermost.calls/metrics", + promModel.JobLabel: "calls", + }, + }, targets) + }) + + t.Run("multi node", func(t *testing.T) { + mockAPI.On("GetPluginStatus", callsPluginID).Return(&model.PluginStatus{ + State: model.PluginStateRunning, + }, nil).Once() + mockAPI.On("LogDebug", "generateCallsTargets: calls plugin running, generating targets").Return().Once() + + targets, err := p.generateCallsTargets(cfg, "localhost", "8067", []*model.ClusterDiscovery{ + { + Hostname: "192.168.1.1", + }, + { + Hostname: "192.168.1.2", + }, + }) + require.NoError(t, err) + require.Equal(t, []promModel.LabelSet{ + { + promModel.AddressLabel: "192.168.1.1:8067", + promModel.MetricsPathLabel: "/plugins/com.mattermost.calls/metrics", + promModel.JobLabel: "calls", + }, + { + promModel.AddressLabel: "192.168.1.2:8067", + promModel.MetricsPathLabel: "/plugins/com.mattermost.calls/metrics", + promModel.JobLabel: "calls", + }, + }, targets) + }) + + t.Run("rtcd", func(t *testing.T) { + mockAPI.On("GetPluginStatus", callsPluginID).Return(&model.PluginStatus{ + State: model.PluginStateRunning, + }, nil).Once() + mockAPI.On("LogDebug", "generateCallsTargets: calls plugin running, generating targets").Return().Once() + + cfg.PluginSettings.Plugins[callsPluginID] = map[string]any{ + "rtcdserviceurl": "http://localhost:8045", + } + + targets, err := p.generateCallsTargets(cfg, "localhost", "8067", nil) + require.NoError(t, err) + require.Equal(t, []promModel.LabelSet{ + { + promModel.AddressLabel: "localhost:8067", + promModel.MetricsPathLabel: "/plugins/com.mattermost.calls/metrics", + promModel.JobLabel: "calls", + }, + { + promModel.AddressLabel: "127.0.0.1:8045", + promModel.JobLabel: "calls", + }, + }, targets) + }) +} diff --git a/server/configuration.go b/server/configuration.go index a31f253..e373afa 100644 --- a/server/configuration.go +++ b/server/configuration.go @@ -232,36 +232,36 @@ func (p *Plugin) isHA() bool { return cfg.ClusterSettings.Enable != nil && *cfg.ClusterSettings.Enable } -func generateTargetGroup(appCfg *model.Config, nodes []*model.ClusterDiscovery) (map[string][]*targetgroup.Group, error) { +func (p *Plugin) generateTargetGroup(appCfg *model.Config, nodes []*model.ClusterDiscovery) (map[string][]*targetgroup.Group, error) { host, port, err := net.SplitHostPort(*appCfg.MetricsSettings.ListenAddress) if err != nil { return nil, fmt.Errorf("could not parse the listen address %q", *appCfg.MetricsSettings.ListenAddress) } sync := make(map[string][]*targetgroup.Group) - if nodes == nil || len(nodes) < 2 { + var targets []promModel.LabelSet + if len(nodes) < 2 { if host == "" { host = "localhost" } - - sync["prometheus"] = []*targetgroup.Group{ + targets = []promModel.LabelSet{ { - Targets: []promModel.LabelSet{ - { - promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(host, port)), - }, - }, + promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(host, port)), }, } - - return sync, nil + } else { + targets = make([]promModel.LabelSet, len(nodes)) + for i, node := range nodes { + targets[i] = promModel.LabelSet{ + promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(node.Hostname, port)), + } + } } - targets := make([]promModel.LabelSet, len(nodes)) - for i, node := range nodes { - targets[i] = promModel.LabelSet{ - promModel.AddressLabel: promModel.LabelValue(net.JoinHostPort(node.Hostname, port)), - } + if callsTargets, err := p.generateCallsTargets(appCfg, host, port, nodes); err != nil { + p.API.LogWarn("failed to generate calls targets", "err", err.Error()) + } else { + targets = append(targets, callsTargets...) } sync["prometheus"] = []*targetgroup.Group{ diff --git a/server/mocks/github.com/mattermost/mattermost/server/public/plugin/mock_API.go b/server/mocks/github.com/mattermost/mattermost/server/public/plugin/mock_API.go new file mode 100644 index 0000000..1affe22 --- /dev/null +++ b/server/mocks/github.com/mattermost/mattermost/server/public/plugin/mock_API.go @@ -0,0 +1,10844 @@ +// Code generated by mockery v2.40.3. DO NOT EDIT. + +package plugin + +import ( + io "io" + http "net/http" + + mock "github.com/stretchr/testify/mock" + + model "github.com/mattermost/mattermost/server/public/model" +) + +// MockAPI is an autogenerated mock type for the API type +type MockAPI struct { + mock.Mock +} + +type MockAPI_Expecter struct { + mock *mock.Mock +} + +func (_m *MockAPI) EXPECT() *MockAPI_Expecter { + return &MockAPI_Expecter{mock: &_m.Mock} +} + +// AddChannelMember provides a mock function with given fields: channelId, userID +func (_m *MockAPI) AddChannelMember(channelId string, userID string) (*model.ChannelMember, *model.AppError) { + ret := _m.Called(channelId, userID) + + if len(ret) == 0 { + panic("no return value specified for AddChannelMember") + } + + var r0 *model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelMember, *model.AppError)); ok { + return rf(channelId, userID) + } + if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { + r0 = rf(channelId, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(channelId, userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_AddChannelMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddChannelMember' +type MockAPI_AddChannelMember_Call struct { + *mock.Call +} + +// AddChannelMember is a helper method to define mock.On call +// - channelId string +// - userID string +func (_e *MockAPI_Expecter) AddChannelMember(channelId interface{}, userID interface{}) *MockAPI_AddChannelMember_Call { + return &MockAPI_AddChannelMember_Call{Call: _e.mock.On("AddChannelMember", channelId, userID)} +} + +func (_c *MockAPI_AddChannelMember_Call) Run(run func(channelId string, userID string)) *MockAPI_AddChannelMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_AddChannelMember_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_AddChannelMember_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_AddChannelMember_Call) RunAndReturn(run func(string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_AddChannelMember_Call { + _c.Call.Return(run) + return _c +} + +// AddReaction provides a mock function with given fields: reaction +func (_m *MockAPI) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) { + ret := _m.Called(reaction) + + if len(ret) == 0 { + panic("no return value specified for AddReaction") + } + + var r0 *model.Reaction + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, *model.AppError)); ok { + return rf(reaction) + } + if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok { + r0 = rf(reaction) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(*model.Reaction) *model.AppError); ok { + r1 = rf(reaction) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_AddReaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReaction' +type MockAPI_AddReaction_Call struct { + *mock.Call +} + +// AddReaction is a helper method to define mock.On call +// - reaction *model.Reaction +func (_e *MockAPI_Expecter) AddReaction(reaction interface{}) *MockAPI_AddReaction_Call { + return &MockAPI_AddReaction_Call{Call: _e.mock.On("AddReaction", reaction)} +} + +func (_c *MockAPI_AddReaction_Call) Run(run func(reaction *model.Reaction)) *MockAPI_AddReaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Reaction)) + }) + return _c +} + +func (_c *MockAPI_AddReaction_Call) Return(_a0 *model.Reaction, _a1 *model.AppError) *MockAPI_AddReaction_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_AddReaction_Call) RunAndReturn(run func(*model.Reaction) (*model.Reaction, *model.AppError)) *MockAPI_AddReaction_Call { + _c.Call.Return(run) + return _c +} + +// AddUserToChannel provides a mock function with given fields: channelId, userID, asUserId +func (_m *MockAPI) AddUserToChannel(channelId string, userID string, asUserId string) (*model.ChannelMember, *model.AppError) { + ret := _m.Called(channelId, userID, asUserId) + + if len(ret) == 0 { + panic("no return value specified for AddUserToChannel") + } + + var r0 *model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) (*model.ChannelMember, *model.AppError)); ok { + return rf(channelId, userID, asUserId) + } + if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelMember); ok { + r0 = rf(channelId, userID, asUserId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { + r1 = rf(channelId, userID, asUserId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_AddUserToChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddUserToChannel' +type MockAPI_AddUserToChannel_Call struct { + *mock.Call +} + +// AddUserToChannel is a helper method to define mock.On call +// - channelId string +// - userID string +// - asUserId string +func (_e *MockAPI_Expecter) AddUserToChannel(channelId interface{}, userID interface{}, asUserId interface{}) *MockAPI_AddUserToChannel_Call { + return &MockAPI_AddUserToChannel_Call{Call: _e.mock.On("AddUserToChannel", channelId, userID, asUserId)} +} + +func (_c *MockAPI_AddUserToChannel_Call) Run(run func(channelId string, userID string, asUserId string)) *MockAPI_AddUserToChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_AddUserToChannel_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_AddUserToChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_AddUserToChannel_Call) RunAndReturn(run func(string, string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_AddUserToChannel_Call { + _c.Call.Return(run) + return _c +} + +// CopyFileInfos provides a mock function with given fields: userID, fileIds +func (_m *MockAPI) CopyFileInfos(userID string, fileIds []string) ([]string, *model.AppError) { + ret := _m.Called(userID, fileIds) + + if len(ret) == 0 { + panic("no return value specified for CopyFileInfos") + } + + var r0 []string + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []string) ([]string, *model.AppError)); ok { + return rf(userID, fileIds) + } + if rf, ok := ret.Get(0).(func(string, []string) []string); ok { + r0 = rf(userID, fileIds) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { + r1 = rf(userID, fileIds) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CopyFileInfos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFileInfos' +type MockAPI_CopyFileInfos_Call struct { + *mock.Call +} + +// CopyFileInfos is a helper method to define mock.On call +// - userID string +// - fileIds []string +func (_e *MockAPI_Expecter) CopyFileInfos(userID interface{}, fileIds interface{}) *MockAPI_CopyFileInfos_Call { + return &MockAPI_CopyFileInfos_Call{Call: _e.mock.On("CopyFileInfos", userID, fileIds)} +} + +func (_c *MockAPI_CopyFileInfos_Call) Run(run func(userID string, fileIds []string)) *MockAPI_CopyFileInfos_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]string)) + }) + return _c +} + +func (_c *MockAPI_CopyFileInfos_Call) Return(_a0 []string, _a1 *model.AppError) *MockAPI_CopyFileInfos_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CopyFileInfos_Call) RunAndReturn(run func(string, []string) ([]string, *model.AppError)) *MockAPI_CopyFileInfos_Call { + _c.Call.Return(run) + return _c +} + +// CreateBot provides a mock function with given fields: bot +func (_m *MockAPI) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) { + ret := _m.Called(bot) + + if len(ret) == 0 { + panic("no return value specified for CreateBot") + } + + var r0 *model.Bot + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, *model.AppError)); ok { + return rf(bot) + } + if rf, ok := ret.Get(0).(func(*model.Bot) *model.Bot); ok { + r0 = rf(bot) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Bot) + } + } + + if rf, ok := ret.Get(1).(func(*model.Bot) *model.AppError); ok { + r1 = rf(bot) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateBot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateBot' +type MockAPI_CreateBot_Call struct { + *mock.Call +} + +// CreateBot is a helper method to define mock.On call +// - bot *model.Bot +func (_e *MockAPI_Expecter) CreateBot(bot interface{}) *MockAPI_CreateBot_Call { + return &MockAPI_CreateBot_Call{Call: _e.mock.On("CreateBot", bot)} +} + +func (_c *MockAPI_CreateBot_Call) Run(run func(bot *model.Bot)) *MockAPI_CreateBot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Bot)) + }) + return _c +} + +func (_c *MockAPI_CreateBot_Call) Return(_a0 *model.Bot, _a1 *model.AppError) *MockAPI_CreateBot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateBot_Call) RunAndReturn(run func(*model.Bot) (*model.Bot, *model.AppError)) *MockAPI_CreateBot_Call { + _c.Call.Return(run) + return _c +} + +// CreateChannel provides a mock function with given fields: channel +func (_m *MockAPI) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { + ret := _m.Called(channel) + + if len(ret) == 0 { + panic("no return value specified for CreateChannel") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Channel) (*model.Channel, *model.AppError)); ok { + return rf(channel) + } + if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { + r0 = rf(channel) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok { + r1 = rf(channel) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChannel' +type MockAPI_CreateChannel_Call struct { + *mock.Call +} + +// CreateChannel is a helper method to define mock.On call +// - channel *model.Channel +func (_e *MockAPI_Expecter) CreateChannel(channel interface{}) *MockAPI_CreateChannel_Call { + return &MockAPI_CreateChannel_Call{Call: _e.mock.On("CreateChannel", channel)} +} + +func (_c *MockAPI_CreateChannel_Call) Run(run func(channel *model.Channel)) *MockAPI_CreateChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Channel)) + }) + return _c +} + +func (_c *MockAPI_CreateChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_CreateChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateChannel_Call) RunAndReturn(run func(*model.Channel) (*model.Channel, *model.AppError)) *MockAPI_CreateChannel_Call { + _c.Call.Return(run) + return _c +} + +// CreateChannelSidebarCategory provides a mock function with given fields: userID, teamID, newCategory +func (_m *MockAPI) CreateChannelSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) { + ret := _m.Called(userID, teamID, newCategory) + + if len(ret) == 0 { + panic("no return value specified for CreateChannelSidebarCategory") + } + + var r0 *model.SidebarCategoryWithChannels + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)); ok { + return rf(userID, teamID, newCategory) + } + if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok { + r0 = rf(userID, teamID, newCategory) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.SidebarCategoryWithChannels) + } + } + + if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) *model.AppError); ok { + r1 = rf(userID, teamID, newCategory) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateChannelSidebarCategory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChannelSidebarCategory' +type MockAPI_CreateChannelSidebarCategory_Call struct { + *mock.Call +} + +// CreateChannelSidebarCategory is a helper method to define mock.On call +// - userID string +// - teamID string +// - newCategory *model.SidebarCategoryWithChannels +func (_e *MockAPI_Expecter) CreateChannelSidebarCategory(userID interface{}, teamID interface{}, newCategory interface{}) *MockAPI_CreateChannelSidebarCategory_Call { + return &MockAPI_CreateChannelSidebarCategory_Call{Call: _e.mock.On("CreateChannelSidebarCategory", userID, teamID, newCategory)} +} + +func (_c *MockAPI_CreateChannelSidebarCategory_Call) Run(run func(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels)) *MockAPI_CreateChannelSidebarCategory_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(*model.SidebarCategoryWithChannels)) + }) + return _c +} + +func (_c *MockAPI_CreateChannelSidebarCategory_Call) Return(_a0 *model.SidebarCategoryWithChannels, _a1 *model.AppError) *MockAPI_CreateChannelSidebarCategory_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateChannelSidebarCategory_Call) RunAndReturn(run func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)) *MockAPI_CreateChannelSidebarCategory_Call { + _c.Call.Return(run) + return _c +} + +// CreateCommand provides a mock function with given fields: cmd +func (_m *MockAPI) CreateCommand(cmd *model.Command) (*model.Command, error) { + ret := _m.Called(cmd) + + if len(ret) == 0 { + panic("no return value specified for CreateCommand") + } + + var r0 *model.Command + var r1 error + if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok { + return rf(cmd) + } + if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok { + r0 = rf(cmd) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(*model.Command) error); ok { + r1 = rf(cmd) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_CreateCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCommand' +type MockAPI_CreateCommand_Call struct { + *mock.Call +} + +// CreateCommand is a helper method to define mock.On call +// - cmd *model.Command +func (_e *MockAPI_Expecter) CreateCommand(cmd interface{}) *MockAPI_CreateCommand_Call { + return &MockAPI_CreateCommand_Call{Call: _e.mock.On("CreateCommand", cmd)} +} + +func (_c *MockAPI_CreateCommand_Call) Run(run func(cmd *model.Command)) *MockAPI_CreateCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Command)) + }) + return _c +} + +func (_c *MockAPI_CreateCommand_Call) Return(_a0 *model.Command, _a1 error) *MockAPI_CreateCommand_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateCommand_Call) RunAndReturn(run func(*model.Command) (*model.Command, error)) *MockAPI_CreateCommand_Call { + _c.Call.Return(run) + return _c +} + +// CreateOAuthApp provides a mock function with given fields: app +func (_m *MockAPI) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) { + ret := _m.Called(app) + + if len(ret) == 0 { + panic("no return value specified for CreateOAuthApp") + } + + var r0 *model.OAuthApp + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)); ok { + return rf(app) + } + if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok { + r0 = rf(app) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.OAuthApp) + } + } + + if rf, ok := ret.Get(1).(func(*model.OAuthApp) *model.AppError); ok { + r1 = rf(app) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateOAuthApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOAuthApp' +type MockAPI_CreateOAuthApp_Call struct { + *mock.Call +} + +// CreateOAuthApp is a helper method to define mock.On call +// - app *model.OAuthApp +func (_e *MockAPI_Expecter) CreateOAuthApp(app interface{}) *MockAPI_CreateOAuthApp_Call { + return &MockAPI_CreateOAuthApp_Call{Call: _e.mock.On("CreateOAuthApp", app)} +} + +func (_c *MockAPI_CreateOAuthApp_Call) Run(run func(app *model.OAuthApp)) *MockAPI_CreateOAuthApp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.OAuthApp)) + }) + return _c +} + +func (_c *MockAPI_CreateOAuthApp_Call) Return(_a0 *model.OAuthApp, _a1 *model.AppError) *MockAPI_CreateOAuthApp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateOAuthApp_Call) RunAndReturn(run func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)) *MockAPI_CreateOAuthApp_Call { + _c.Call.Return(run) + return _c +} + +// CreatePost provides a mock function with given fields: post +func (_m *MockAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError) { + ret := _m.Called(post) + + if len(ret) == 0 { + panic("no return value specified for CreatePost") + } + + var r0 *model.Post + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok { + return rf(post) + } + if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { + r0 = rf(post) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Post) + } + } + + if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok { + r1 = rf(post) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreatePost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePost' +type MockAPI_CreatePost_Call struct { + *mock.Call +} + +// CreatePost is a helper method to define mock.On call +// - post *model.Post +func (_e *MockAPI_Expecter) CreatePost(post interface{}) *MockAPI_CreatePost_Call { + return &MockAPI_CreatePost_Call{Call: _e.mock.On("CreatePost", post)} +} + +func (_c *MockAPI_CreatePost_Call) Run(run func(post *model.Post)) *MockAPI_CreatePost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Post)) + }) + return _c +} + +func (_c *MockAPI_CreatePost_Call) Return(_a0 *model.Post, _a1 *model.AppError) *MockAPI_CreatePost_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreatePost_Call) RunAndReturn(run func(*model.Post) (*model.Post, *model.AppError)) *MockAPI_CreatePost_Call { + _c.Call.Return(run) + return _c +} + +// CreateSession provides a mock function with given fields: session +func (_m *MockAPI) CreateSession(session *model.Session) (*model.Session, *model.AppError) { + ret := _m.Called(session) + + if len(ret) == 0 { + panic("no return value specified for CreateSession") + } + + var r0 *model.Session + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Session) (*model.Session, *model.AppError)); ok { + return rf(session) + } + if rf, ok := ret.Get(0).(func(*model.Session) *model.Session); ok { + r0 = rf(session) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Session) + } + } + + if rf, ok := ret.Get(1).(func(*model.Session) *model.AppError); ok { + r1 = rf(session) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSession' +type MockAPI_CreateSession_Call struct { + *mock.Call +} + +// CreateSession is a helper method to define mock.On call +// - session *model.Session +func (_e *MockAPI_Expecter) CreateSession(session interface{}) *MockAPI_CreateSession_Call { + return &MockAPI_CreateSession_Call{Call: _e.mock.On("CreateSession", session)} +} + +func (_c *MockAPI_CreateSession_Call) Run(run func(session *model.Session)) *MockAPI_CreateSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Session)) + }) + return _c +} + +func (_c *MockAPI_CreateSession_Call) Return(_a0 *model.Session, _a1 *model.AppError) *MockAPI_CreateSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateSession_Call) RunAndReturn(run func(*model.Session) (*model.Session, *model.AppError)) *MockAPI_CreateSession_Call { + _c.Call.Return(run) + return _c +} + +// CreateTeam provides a mock function with given fields: team +func (_m *MockAPI) CreateTeam(team *model.Team) (*model.Team, *model.AppError) { + ret := _m.Called(team) + + if len(ret) == 0 { + panic("no return value specified for CreateTeam") + } + + var r0 *model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, *model.AppError)); ok { + return rf(team) + } + if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok { + r0 = rf(team) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(*model.Team) *model.AppError); ok { + r1 = rf(team) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeam' +type MockAPI_CreateTeam_Call struct { + *mock.Call +} + +// CreateTeam is a helper method to define mock.On call +// - team *model.Team +func (_e *MockAPI_Expecter) CreateTeam(team interface{}) *MockAPI_CreateTeam_Call { + return &MockAPI_CreateTeam_Call{Call: _e.mock.On("CreateTeam", team)} +} + +func (_c *MockAPI_CreateTeam_Call) Run(run func(team *model.Team)) *MockAPI_CreateTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Team)) + }) + return _c +} + +func (_c *MockAPI_CreateTeam_Call) Return(_a0 *model.Team, _a1 *model.AppError) *MockAPI_CreateTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateTeam_Call) RunAndReturn(run func(*model.Team) (*model.Team, *model.AppError)) *MockAPI_CreateTeam_Call { + _c.Call.Return(run) + return _c +} + +// CreateTeamMember provides a mock function with given fields: teamID, userID +func (_m *MockAPI) CreateTeamMember(teamID string, userID string) (*model.TeamMember, *model.AppError) { + ret := _m.Called(teamID, userID) + + if len(ret) == 0 { + panic("no return value specified for CreateTeamMember") + } + + var r0 *model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.TeamMember, *model.AppError)); ok { + return rf(teamID, userID) + } + if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok { + r0 = rf(teamID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(teamID, userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateTeamMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMember' +type MockAPI_CreateTeamMember_Call struct { + *mock.Call +} + +// CreateTeamMember is a helper method to define mock.On call +// - teamID string +// - userID string +func (_e *MockAPI_Expecter) CreateTeamMember(teamID interface{}, userID interface{}) *MockAPI_CreateTeamMember_Call { + return &MockAPI_CreateTeamMember_Call{Call: _e.mock.On("CreateTeamMember", teamID, userID)} +} + +func (_c *MockAPI_CreateTeamMember_Call) Run(run func(teamID string, userID string)) *MockAPI_CreateTeamMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_CreateTeamMember_Call) Return(_a0 *model.TeamMember, _a1 *model.AppError) *MockAPI_CreateTeamMember_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateTeamMember_Call) RunAndReturn(run func(string, string) (*model.TeamMember, *model.AppError)) *MockAPI_CreateTeamMember_Call { + _c.Call.Return(run) + return _c +} + +// CreateTeamMembers provides a mock function with given fields: teamID, userIds, requestorId +func (_m *MockAPI) CreateTeamMembers(teamID string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError) { + ret := _m.Called(teamID, userIds, requestorId) + + if len(ret) == 0 { + panic("no return value specified for CreateTeamMembers") + } + + var r0 []*model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMember, *model.AppError)); ok { + return rf(teamID, userIds, requestorId) + } + if rf, ok := ret.Get(0).(func(string, []string, string) []*model.TeamMember); ok { + r0 = rf(teamID, userIds, requestorId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, []string, string) *model.AppError); ok { + r1 = rf(teamID, userIds, requestorId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateTeamMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMembers' +type MockAPI_CreateTeamMembers_Call struct { + *mock.Call +} + +// CreateTeamMembers is a helper method to define mock.On call +// - teamID string +// - userIds []string +// - requestorId string +func (_e *MockAPI_Expecter) CreateTeamMembers(teamID interface{}, userIds interface{}, requestorId interface{}) *MockAPI_CreateTeamMembers_Call { + return &MockAPI_CreateTeamMembers_Call{Call: _e.mock.On("CreateTeamMembers", teamID, userIds, requestorId)} +} + +func (_c *MockAPI_CreateTeamMembers_Call) Run(run func(teamID string, userIds []string, requestorId string)) *MockAPI_CreateTeamMembers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_CreateTeamMembers_Call) Return(_a0 []*model.TeamMember, _a1 *model.AppError) *MockAPI_CreateTeamMembers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateTeamMembers_Call) RunAndReturn(run func(string, []string, string) ([]*model.TeamMember, *model.AppError)) *MockAPI_CreateTeamMembers_Call { + _c.Call.Return(run) + return _c +} + +// CreateTeamMembersGracefully provides a mock function with given fields: teamID, userIds, requestorId +func (_m *MockAPI) CreateTeamMembersGracefully(teamID string, userIds []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError) { + ret := _m.Called(teamID, userIds, requestorId) + + if len(ret) == 0 { + panic("no return value specified for CreateTeamMembersGracefully") + } + + var r0 []*model.TeamMemberWithError + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMemberWithError, *model.AppError)); ok { + return rf(teamID, userIds, requestorId) + } + if rf, ok := ret.Get(0).(func(string, []string, string) []*model.TeamMemberWithError); ok { + r0 = rf(teamID, userIds, requestorId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.TeamMemberWithError) + } + } + + if rf, ok := ret.Get(1).(func(string, []string, string) *model.AppError); ok { + r1 = rf(teamID, userIds, requestorId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateTeamMembersGracefully_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMembersGracefully' +type MockAPI_CreateTeamMembersGracefully_Call struct { + *mock.Call +} + +// CreateTeamMembersGracefully is a helper method to define mock.On call +// - teamID string +// - userIds []string +// - requestorId string +func (_e *MockAPI_Expecter) CreateTeamMembersGracefully(teamID interface{}, userIds interface{}, requestorId interface{}) *MockAPI_CreateTeamMembersGracefully_Call { + return &MockAPI_CreateTeamMembersGracefully_Call{Call: _e.mock.On("CreateTeamMembersGracefully", teamID, userIds, requestorId)} +} + +func (_c *MockAPI_CreateTeamMembersGracefully_Call) Run(run func(teamID string, userIds []string, requestorId string)) *MockAPI_CreateTeamMembersGracefully_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_CreateTeamMembersGracefully_Call) Return(_a0 []*model.TeamMemberWithError, _a1 *model.AppError) *MockAPI_CreateTeamMembersGracefully_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateTeamMembersGracefully_Call) RunAndReturn(run func(string, []string, string) ([]*model.TeamMemberWithError, *model.AppError)) *MockAPI_CreateTeamMembersGracefully_Call { + _c.Call.Return(run) + return _c +} + +// CreateUploadSession provides a mock function with given fields: us +func (_m *MockAPI) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, error) { + ret := _m.Called(us) + + if len(ret) == 0 { + panic("no return value specified for CreateUploadSession") + } + + var r0 *model.UploadSession + var r1 error + if rf, ok := ret.Get(0).(func(*model.UploadSession) (*model.UploadSession, error)); ok { + return rf(us) + } + if rf, ok := ret.Get(0).(func(*model.UploadSession) *model.UploadSession); ok { + r0 = rf(us) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.UploadSession) + } + } + + if rf, ok := ret.Get(1).(func(*model.UploadSession) error); ok { + r1 = rf(us) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_CreateUploadSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUploadSession' +type MockAPI_CreateUploadSession_Call struct { + *mock.Call +} + +// CreateUploadSession is a helper method to define mock.On call +// - us *model.UploadSession +func (_e *MockAPI_Expecter) CreateUploadSession(us interface{}) *MockAPI_CreateUploadSession_Call { + return &MockAPI_CreateUploadSession_Call{Call: _e.mock.On("CreateUploadSession", us)} +} + +func (_c *MockAPI_CreateUploadSession_Call) Run(run func(us *model.UploadSession)) *MockAPI_CreateUploadSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.UploadSession)) + }) + return _c +} + +func (_c *MockAPI_CreateUploadSession_Call) Return(_a0 *model.UploadSession, _a1 error) *MockAPI_CreateUploadSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateUploadSession_Call) RunAndReturn(run func(*model.UploadSession) (*model.UploadSession, error)) *MockAPI_CreateUploadSession_Call { + _c.Call.Return(run) + return _c +} + +// CreateUser provides a mock function with given fields: user +func (_m *MockAPI) CreateUser(user *model.User) (*model.User, *model.AppError) { + ret := _m.Called(user) + + if len(ret) == 0 { + panic("no return value specified for CreateUser") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok { + return rf(user) + } + if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { + r0 = rf(user) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(*model.User) *model.AppError); ok { + r1 = rf(user) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser' +type MockAPI_CreateUser_Call struct { + *mock.Call +} + +// CreateUser is a helper method to define mock.On call +// - user *model.User +func (_e *MockAPI_Expecter) CreateUser(user interface{}) *MockAPI_CreateUser_Call { + return &MockAPI_CreateUser_Call{Call: _e.mock.On("CreateUser", user)} +} + +func (_c *MockAPI_CreateUser_Call) Run(run func(user *model.User)) *MockAPI_CreateUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.User)) + }) + return _c +} + +func (_c *MockAPI_CreateUser_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_CreateUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateUser_Call) RunAndReturn(run func(*model.User) (*model.User, *model.AppError)) *MockAPI_CreateUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateUserAccessToken provides a mock function with given fields: token +func (_m *MockAPI) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError) { + ret := _m.Called(token) + + if len(ret) == 0 { + panic("no return value specified for CreateUserAccessToken") + } + + var r0 *model.UserAccessToken + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.UserAccessToken) (*model.UserAccessToken, *model.AppError)); ok { + return rf(token) + } + if rf, ok := ret.Get(0).(func(*model.UserAccessToken) *model.UserAccessToken); ok { + r0 = rf(token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.UserAccessToken) + } + } + + if rf, ok := ret.Get(1).(func(*model.UserAccessToken) *model.AppError); ok { + r1 = rf(token) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_CreateUserAccessToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUserAccessToken' +type MockAPI_CreateUserAccessToken_Call struct { + *mock.Call +} + +// CreateUserAccessToken is a helper method to define mock.On call +// - token *model.UserAccessToken +func (_e *MockAPI_Expecter) CreateUserAccessToken(token interface{}) *MockAPI_CreateUserAccessToken_Call { + return &MockAPI_CreateUserAccessToken_Call{Call: _e.mock.On("CreateUserAccessToken", token)} +} + +func (_c *MockAPI_CreateUserAccessToken_Call) Run(run func(token *model.UserAccessToken)) *MockAPI_CreateUserAccessToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.UserAccessToken)) + }) + return _c +} + +func (_c *MockAPI_CreateUserAccessToken_Call) Return(_a0 *model.UserAccessToken, _a1 *model.AppError) *MockAPI_CreateUserAccessToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_CreateUserAccessToken_Call) RunAndReturn(run func(*model.UserAccessToken) (*model.UserAccessToken, *model.AppError)) *MockAPI_CreateUserAccessToken_Call { + _c.Call.Return(run) + return _c +} + +// DeleteChannel provides a mock function with given fields: channelId +func (_m *MockAPI) DeleteChannel(channelId string) *model.AppError { + ret := _m.Called(channelId) + + if len(ret) == 0 { + panic("no return value specified for DeleteChannel") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteChannel' +type MockAPI_DeleteChannel_Call struct { + *mock.Call +} + +// DeleteChannel is a helper method to define mock.On call +// - channelId string +func (_e *MockAPI_Expecter) DeleteChannel(channelId interface{}) *MockAPI_DeleteChannel_Call { + return &MockAPI_DeleteChannel_Call{Call: _e.mock.On("DeleteChannel", channelId)} +} + +func (_c *MockAPI_DeleteChannel_Call) Run(run func(channelId string)) *MockAPI_DeleteChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteChannel_Call) Return(_a0 *model.AppError) *MockAPI_DeleteChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteChannel_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DeleteChannel_Call { + _c.Call.Return(run) + return _c +} + +// DeleteChannelMember provides a mock function with given fields: channelId, userID +func (_m *MockAPI) DeleteChannelMember(channelId string, userID string) *model.AppError { + ret := _m.Called(channelId, userID) + + if len(ret) == 0 { + panic("no return value specified for DeleteChannelMember") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { + r0 = rf(channelId, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteChannelMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteChannelMember' +type MockAPI_DeleteChannelMember_Call struct { + *mock.Call +} + +// DeleteChannelMember is a helper method to define mock.On call +// - channelId string +// - userID string +func (_e *MockAPI_Expecter) DeleteChannelMember(channelId interface{}, userID interface{}) *MockAPI_DeleteChannelMember_Call { + return &MockAPI_DeleteChannelMember_Call{Call: _e.mock.On("DeleteChannelMember", channelId, userID)} +} + +func (_c *MockAPI_DeleteChannelMember_Call) Run(run func(channelId string, userID string)) *MockAPI_DeleteChannelMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteChannelMember_Call) Return(_a0 *model.AppError) *MockAPI_DeleteChannelMember_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteChannelMember_Call) RunAndReturn(run func(string, string) *model.AppError) *MockAPI_DeleteChannelMember_Call { + _c.Call.Return(run) + return _c +} + +// DeleteCommand provides a mock function with given fields: commandID +func (_m *MockAPI) DeleteCommand(commandID string) error { + ret := _m.Called(commandID) + + if len(ret) == 0 { + panic("no return value specified for DeleteCommand") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(commandID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_DeleteCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCommand' +type MockAPI_DeleteCommand_Call struct { + *mock.Call +} + +// DeleteCommand is a helper method to define mock.On call +// - commandID string +func (_e *MockAPI_Expecter) DeleteCommand(commandID interface{}) *MockAPI_DeleteCommand_Call { + return &MockAPI_DeleteCommand_Call{Call: _e.mock.On("DeleteCommand", commandID)} +} + +func (_c *MockAPI_DeleteCommand_Call) Run(run func(commandID string)) *MockAPI_DeleteCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteCommand_Call) Return(_a0 error) *MockAPI_DeleteCommand_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteCommand_Call) RunAndReturn(run func(string) error) *MockAPI_DeleteCommand_Call { + _c.Call.Return(run) + return _c +} + +// DeleteEphemeralPost provides a mock function with given fields: userID, postId +func (_m *MockAPI) DeleteEphemeralPost(userID string, postId string) { + _m.Called(userID, postId) +} + +// MockAPI_DeleteEphemeralPost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEphemeralPost' +type MockAPI_DeleteEphemeralPost_Call struct { + *mock.Call +} + +// DeleteEphemeralPost is a helper method to define mock.On call +// - userID string +// - postId string +func (_e *MockAPI_Expecter) DeleteEphemeralPost(userID interface{}, postId interface{}) *MockAPI_DeleteEphemeralPost_Call { + return &MockAPI_DeleteEphemeralPost_Call{Call: _e.mock.On("DeleteEphemeralPost", userID, postId)} +} + +func (_c *MockAPI_DeleteEphemeralPost_Call) Run(run func(userID string, postId string)) *MockAPI_DeleteEphemeralPost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteEphemeralPost_Call) Return() *MockAPI_DeleteEphemeralPost_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_DeleteEphemeralPost_Call) RunAndReturn(run func(string, string)) *MockAPI_DeleteEphemeralPost_Call { + _c.Call.Return(run) + return _c +} + +// DeleteOAuthApp provides a mock function with given fields: appID +func (_m *MockAPI) DeleteOAuthApp(appID string) *model.AppError { + ret := _m.Called(appID) + + if len(ret) == 0 { + panic("no return value specified for DeleteOAuthApp") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(appID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteOAuthApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOAuthApp' +type MockAPI_DeleteOAuthApp_Call struct { + *mock.Call +} + +// DeleteOAuthApp is a helper method to define mock.On call +// - appID string +func (_e *MockAPI_Expecter) DeleteOAuthApp(appID interface{}) *MockAPI_DeleteOAuthApp_Call { + return &MockAPI_DeleteOAuthApp_Call{Call: _e.mock.On("DeleteOAuthApp", appID)} +} + +func (_c *MockAPI_DeleteOAuthApp_Call) Run(run func(appID string)) *MockAPI_DeleteOAuthApp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteOAuthApp_Call) Return(_a0 *model.AppError) *MockAPI_DeleteOAuthApp_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteOAuthApp_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DeleteOAuthApp_Call { + _c.Call.Return(run) + return _c +} + +// DeletePost provides a mock function with given fields: postId +func (_m *MockAPI) DeletePost(postId string) *model.AppError { + ret := _m.Called(postId) + + if len(ret) == 0 { + panic("no return value specified for DeletePost") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(postId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeletePost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePost' +type MockAPI_DeletePost_Call struct { + *mock.Call +} + +// DeletePost is a helper method to define mock.On call +// - postId string +func (_e *MockAPI_Expecter) DeletePost(postId interface{}) *MockAPI_DeletePost_Call { + return &MockAPI_DeletePost_Call{Call: _e.mock.On("DeletePost", postId)} +} + +func (_c *MockAPI_DeletePost_Call) Run(run func(postId string)) *MockAPI_DeletePost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeletePost_Call) Return(_a0 *model.AppError) *MockAPI_DeletePost_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeletePost_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DeletePost_Call { + _c.Call.Return(run) + return _c +} + +// DeletePreferencesForUser provides a mock function with given fields: userID, preferences +func (_m *MockAPI) DeletePreferencesForUser(userID string, preferences []model.Preference) *model.AppError { + ret := _m.Called(userID, preferences) + + if len(ret) == 0 { + panic("no return value specified for DeletePreferencesForUser") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []model.Preference) *model.AppError); ok { + r0 = rf(userID, preferences) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeletePreferencesForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePreferencesForUser' +type MockAPI_DeletePreferencesForUser_Call struct { + *mock.Call +} + +// DeletePreferencesForUser is a helper method to define mock.On call +// - userID string +// - preferences []model.Preference +func (_e *MockAPI_Expecter) DeletePreferencesForUser(userID interface{}, preferences interface{}) *MockAPI_DeletePreferencesForUser_Call { + return &MockAPI_DeletePreferencesForUser_Call{Call: _e.mock.On("DeletePreferencesForUser", userID, preferences)} +} + +func (_c *MockAPI_DeletePreferencesForUser_Call) Run(run func(userID string, preferences []model.Preference)) *MockAPI_DeletePreferencesForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]model.Preference)) + }) + return _c +} + +func (_c *MockAPI_DeletePreferencesForUser_Call) Return(_a0 *model.AppError) *MockAPI_DeletePreferencesForUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeletePreferencesForUser_Call) RunAndReturn(run func(string, []model.Preference) *model.AppError) *MockAPI_DeletePreferencesForUser_Call { + _c.Call.Return(run) + return _c +} + +// DeleteTeam provides a mock function with given fields: teamID +func (_m *MockAPI) DeleteTeam(teamID string) *model.AppError { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for DeleteTeam") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTeam' +type MockAPI_DeleteTeam_Call struct { + *mock.Call +} + +// DeleteTeam is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) DeleteTeam(teamID interface{}) *MockAPI_DeleteTeam_Call { + return &MockAPI_DeleteTeam_Call{Call: _e.mock.On("DeleteTeam", teamID)} +} + +func (_c *MockAPI_DeleteTeam_Call) Run(run func(teamID string)) *MockAPI_DeleteTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteTeam_Call) Return(_a0 *model.AppError) *MockAPI_DeleteTeam_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteTeam_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DeleteTeam_Call { + _c.Call.Return(run) + return _c +} + +// DeleteTeamMember provides a mock function with given fields: teamID, userID, requestorId +func (_m *MockAPI) DeleteTeamMember(teamID string, userID string, requestorId string) *model.AppError { + ret := _m.Called(teamID, userID, requestorId) + + if len(ret) == 0 { + panic("no return value specified for DeleteTeamMember") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { + r0 = rf(teamID, userID, requestorId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteTeamMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTeamMember' +type MockAPI_DeleteTeamMember_Call struct { + *mock.Call +} + +// DeleteTeamMember is a helper method to define mock.On call +// - teamID string +// - userID string +// - requestorId string +func (_e *MockAPI_Expecter) DeleteTeamMember(teamID interface{}, userID interface{}, requestorId interface{}) *MockAPI_DeleteTeamMember_Call { + return &MockAPI_DeleteTeamMember_Call{Call: _e.mock.On("DeleteTeamMember", teamID, userID, requestorId)} +} + +func (_c *MockAPI_DeleteTeamMember_Call) Run(run func(teamID string, userID string, requestorId string)) *MockAPI_DeleteTeamMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteTeamMember_Call) Return(_a0 *model.AppError) *MockAPI_DeleteTeamMember_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteTeamMember_Call) RunAndReturn(run func(string, string, string) *model.AppError) *MockAPI_DeleteTeamMember_Call { + _c.Call.Return(run) + return _c +} + +// DeleteUser provides a mock function with given fields: userID +func (_m *MockAPI) DeleteUser(userID string) *model.AppError { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for DeleteUser") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser' +type MockAPI_DeleteUser_Call struct { + *mock.Call +} + +// DeleteUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) DeleteUser(userID interface{}) *MockAPI_DeleteUser_Call { + return &MockAPI_DeleteUser_Call{Call: _e.mock.On("DeleteUser", userID)} +} + +func (_c *MockAPI_DeleteUser_Call) Run(run func(userID string)) *MockAPI_DeleteUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DeleteUser_Call) Return(_a0 *model.AppError) *MockAPI_DeleteUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DeleteUser_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DeleteUser_Call { + _c.Call.Return(run) + return _c +} + +// DisablePlugin provides a mock function with given fields: id +func (_m *MockAPI) DisablePlugin(id string) *model.AppError { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for DisablePlugin") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_DisablePlugin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisablePlugin' +type MockAPI_DisablePlugin_Call struct { + *mock.Call +} + +// DisablePlugin is a helper method to define mock.On call +// - id string +func (_e *MockAPI_Expecter) DisablePlugin(id interface{}) *MockAPI_DisablePlugin_Call { + return &MockAPI_DisablePlugin_Call{Call: _e.mock.On("DisablePlugin", id)} +} + +func (_c *MockAPI_DisablePlugin_Call) Run(run func(id string)) *MockAPI_DisablePlugin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_DisablePlugin_Call) Return(_a0 *model.AppError) *MockAPI_DisablePlugin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_DisablePlugin_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_DisablePlugin_Call { + _c.Call.Return(run) + return _c +} + +// EnablePlugin provides a mock function with given fields: id +func (_m *MockAPI) EnablePlugin(id string) *model.AppError { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for EnablePlugin") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_EnablePlugin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnablePlugin' +type MockAPI_EnablePlugin_Call struct { + *mock.Call +} + +// EnablePlugin is a helper method to define mock.On call +// - id string +func (_e *MockAPI_Expecter) EnablePlugin(id interface{}) *MockAPI_EnablePlugin_Call { + return &MockAPI_EnablePlugin_Call{Call: _e.mock.On("EnablePlugin", id)} +} + +func (_c *MockAPI_EnablePlugin_Call) Run(run func(id string)) *MockAPI_EnablePlugin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_EnablePlugin_Call) Return(_a0 *model.AppError) *MockAPI_EnablePlugin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_EnablePlugin_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_EnablePlugin_Call { + _c.Call.Return(run) + return _c +} + +// EnsureBotUser provides a mock function with given fields: bot +func (_m *MockAPI) EnsureBotUser(bot *model.Bot) (string, error) { + ret := _m.Called(bot) + + if len(ret) == 0 { + panic("no return value specified for EnsureBotUser") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(*model.Bot) (string, error)); ok { + return rf(bot) + } + if rf, ok := ret.Get(0).(func(*model.Bot) string); ok { + r0 = rf(bot) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(*model.Bot) error); ok { + r1 = rf(bot) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_EnsureBotUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureBotUser' +type MockAPI_EnsureBotUser_Call struct { + *mock.Call +} + +// EnsureBotUser is a helper method to define mock.On call +// - bot *model.Bot +func (_e *MockAPI_Expecter) EnsureBotUser(bot interface{}) *MockAPI_EnsureBotUser_Call { + return &MockAPI_EnsureBotUser_Call{Call: _e.mock.On("EnsureBotUser", bot)} +} + +func (_c *MockAPI_EnsureBotUser_Call) Run(run func(bot *model.Bot)) *MockAPI_EnsureBotUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Bot)) + }) + return _c +} + +func (_c *MockAPI_EnsureBotUser_Call) Return(_a0 string, _a1 error) *MockAPI_EnsureBotUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_EnsureBotUser_Call) RunAndReturn(run func(*model.Bot) (string, error)) *MockAPI_EnsureBotUser_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteSlashCommand provides a mock function with given fields: commandArgs +func (_m *MockAPI) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error) { + ret := _m.Called(commandArgs) + + if len(ret) == 0 { + panic("no return value specified for ExecuteSlashCommand") + } + + var r0 *model.CommandResponse + var r1 error + if rf, ok := ret.Get(0).(func(*model.CommandArgs) (*model.CommandResponse, error)); ok { + return rf(commandArgs) + } + if rf, ok := ret.Get(0).(func(*model.CommandArgs) *model.CommandResponse); ok { + r0 = rf(commandArgs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.CommandResponse) + } + } + + if rf, ok := ret.Get(1).(func(*model.CommandArgs) error); ok { + r1 = rf(commandArgs) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ExecuteSlashCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteSlashCommand' +type MockAPI_ExecuteSlashCommand_Call struct { + *mock.Call +} + +// ExecuteSlashCommand is a helper method to define mock.On call +// - commandArgs *model.CommandArgs +func (_e *MockAPI_Expecter) ExecuteSlashCommand(commandArgs interface{}) *MockAPI_ExecuteSlashCommand_Call { + return &MockAPI_ExecuteSlashCommand_Call{Call: _e.mock.On("ExecuteSlashCommand", commandArgs)} +} + +func (_c *MockAPI_ExecuteSlashCommand_Call) Run(run func(commandArgs *model.CommandArgs)) *MockAPI_ExecuteSlashCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.CommandArgs)) + }) + return _c +} + +func (_c *MockAPI_ExecuteSlashCommand_Call) Return(_a0 *model.CommandResponse, _a1 error) *MockAPI_ExecuteSlashCommand_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ExecuteSlashCommand_Call) RunAndReturn(run func(*model.CommandArgs) (*model.CommandResponse, error)) *MockAPI_ExecuteSlashCommand_Call { + _c.Call.Return(run) + return _c +} + +// ExtendSessionExpiry provides a mock function with given fields: sessionID, newExpiry +func (_m *MockAPI) ExtendSessionExpiry(sessionID string, newExpiry int64) *model.AppError { + ret := _m.Called(sessionID, newExpiry) + + if len(ret) == 0 { + panic("no return value specified for ExtendSessionExpiry") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok { + r0 = rf(sessionID, newExpiry) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_ExtendSessionExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendSessionExpiry' +type MockAPI_ExtendSessionExpiry_Call struct { + *mock.Call +} + +// ExtendSessionExpiry is a helper method to define mock.On call +// - sessionID string +// - newExpiry int64 +func (_e *MockAPI_Expecter) ExtendSessionExpiry(sessionID interface{}, newExpiry interface{}) *MockAPI_ExtendSessionExpiry_Call { + return &MockAPI_ExtendSessionExpiry_Call{Call: _e.mock.On("ExtendSessionExpiry", sessionID, newExpiry)} +} + +func (_c *MockAPI_ExtendSessionExpiry_Call) Run(run func(sessionID string, newExpiry int64)) *MockAPI_ExtendSessionExpiry_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int64)) + }) + return _c +} + +func (_c *MockAPI_ExtendSessionExpiry_Call) Return(_a0 *model.AppError) *MockAPI_ExtendSessionExpiry_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_ExtendSessionExpiry_Call) RunAndReturn(run func(string, int64) *model.AppError) *MockAPI_ExtendSessionExpiry_Call { + _c.Call.Return(run) + return _c +} + +// GetBot provides a mock function with given fields: botUserId, includeDeleted +func (_m *MockAPI) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) { + ret := _m.Called(botUserId, includeDeleted) + + if len(ret) == 0 { + panic("no return value specified for GetBot") + } + + var r0 *model.Bot + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, *model.AppError)); ok { + return rf(botUserId, includeDeleted) + } + if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok { + r0 = rf(botUserId, includeDeleted) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Bot) + } + } + + if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { + r1 = rf(botUserId, includeDeleted) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetBot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBot' +type MockAPI_GetBot_Call struct { + *mock.Call +} + +// GetBot is a helper method to define mock.On call +// - botUserId string +// - includeDeleted bool +func (_e *MockAPI_Expecter) GetBot(botUserId interface{}, includeDeleted interface{}) *MockAPI_GetBot_Call { + return &MockAPI_GetBot_Call{Call: _e.mock.On("GetBot", botUserId, includeDeleted)} +} + +func (_c *MockAPI_GetBot_Call) Run(run func(botUserId string, includeDeleted bool)) *MockAPI_GetBot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *MockAPI_GetBot_Call) Return(_a0 *model.Bot, _a1 *model.AppError) *MockAPI_GetBot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetBot_Call) RunAndReturn(run func(string, bool) (*model.Bot, *model.AppError)) *MockAPI_GetBot_Call { + _c.Call.Return(run) + return _c +} + +// GetBots provides a mock function with given fields: options +func (_m *MockAPI) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError) { + ret := _m.Called(options) + + if len(ret) == 0 { + panic("no return value specified for GetBots") + } + + var r0 []*model.Bot + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.BotGetOptions) ([]*model.Bot, *model.AppError)); ok { + return rf(options) + } + if rf, ok := ret.Get(0).(func(*model.BotGetOptions) []*model.Bot); ok { + r0 = rf(options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Bot) + } + } + + if rf, ok := ret.Get(1).(func(*model.BotGetOptions) *model.AppError); ok { + r1 = rf(options) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetBots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBots' +type MockAPI_GetBots_Call struct { + *mock.Call +} + +// GetBots is a helper method to define mock.On call +// - options *model.BotGetOptions +func (_e *MockAPI_Expecter) GetBots(options interface{}) *MockAPI_GetBots_Call { + return &MockAPI_GetBots_Call{Call: _e.mock.On("GetBots", options)} +} + +func (_c *MockAPI_GetBots_Call) Run(run func(options *model.BotGetOptions)) *MockAPI_GetBots_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.BotGetOptions)) + }) + return _c +} + +func (_c *MockAPI_GetBots_Call) Return(_a0 []*model.Bot, _a1 *model.AppError) *MockAPI_GetBots_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetBots_Call) RunAndReturn(run func(*model.BotGetOptions) ([]*model.Bot, *model.AppError)) *MockAPI_GetBots_Call { + _c.Call.Return(run) + return _c +} + +// GetBundlePath provides a mock function with given fields: +func (_m *MockAPI) GetBundlePath() (string, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBundlePath") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func() (string, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_GetBundlePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBundlePath' +type MockAPI_GetBundlePath_Call struct { + *mock.Call +} + +// GetBundlePath is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetBundlePath() *MockAPI_GetBundlePath_Call { + return &MockAPI_GetBundlePath_Call{Call: _e.mock.On("GetBundlePath")} +} + +func (_c *MockAPI_GetBundlePath_Call) Run(run func()) *MockAPI_GetBundlePath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetBundlePath_Call) Return(_a0 string, _a1 error) *MockAPI_GetBundlePath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetBundlePath_Call) RunAndReturn(run func() (string, error)) *MockAPI_GetBundlePath_Call { + _c.Call.Return(run) + return _c +} + +// GetChannel provides a mock function with given fields: channelId +func (_m *MockAPI) GetChannel(channelId string) (*model.Channel, *model.AppError) { + ret := _m.Called(channelId) + + if len(ret) == 0 { + panic("no return value specified for GetChannel") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Channel, *model.AppError)); ok { + return rf(channelId) + } + if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(channelId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannel' +type MockAPI_GetChannel_Call struct { + *mock.Call +} + +// GetChannel is a helper method to define mock.On call +// - channelId string +func (_e *MockAPI_Expecter) GetChannel(channelId interface{}) *MockAPI_GetChannel_Call { + return &MockAPI_GetChannel_Call{Call: _e.mock.On("GetChannel", channelId)} +} + +func (_c *MockAPI_GetChannel_Call) Run(run func(channelId string)) *MockAPI_GetChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_GetChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannel_Call) RunAndReturn(run func(string) (*model.Channel, *model.AppError)) *MockAPI_GetChannel_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelByName provides a mock function with given fields: teamID, name, includeDeleted +func (_m *MockAPI) GetChannelByName(teamID string, name string, includeDeleted bool) (*model.Channel, *model.AppError) { + ret := _m.Called(teamID, name, includeDeleted) + + if len(ret) == 0 { + panic("no return value specified for GetChannelByName") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, *model.AppError)); ok { + return rf(teamID, name, includeDeleted) + } + if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { + r0 = rf(teamID, name, includeDeleted) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { + r1 = rf(teamID, name, includeDeleted) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelByName' +type MockAPI_GetChannelByName_Call struct { + *mock.Call +} + +// GetChannelByName is a helper method to define mock.On call +// - teamID string +// - name string +// - includeDeleted bool +func (_e *MockAPI_Expecter) GetChannelByName(teamID interface{}, name interface{}, includeDeleted interface{}) *MockAPI_GetChannelByName_Call { + return &MockAPI_GetChannelByName_Call{Call: _e.mock.On("GetChannelByName", teamID, name, includeDeleted)} +} + +func (_c *MockAPI_GetChannelByName_Call) Run(run func(teamID string, name string, includeDeleted bool)) *MockAPI_GetChannelByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(bool)) + }) + return _c +} + +func (_c *MockAPI_GetChannelByName_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_GetChannelByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelByName_Call) RunAndReturn(run func(string, string, bool) (*model.Channel, *model.AppError)) *MockAPI_GetChannelByName_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelByNameForTeamName provides a mock function with given fields: teamName, channelName, includeDeleted +func (_m *MockAPI) GetChannelByNameForTeamName(teamName string, channelName string, includeDeleted bool) (*model.Channel, *model.AppError) { + ret := _m.Called(teamName, channelName, includeDeleted) + + if len(ret) == 0 { + panic("no return value specified for GetChannelByNameForTeamName") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, bool) (*model.Channel, *model.AppError)); ok { + return rf(teamName, channelName, includeDeleted) + } + if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { + r0 = rf(teamName, channelName, includeDeleted) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { + r1 = rf(teamName, channelName, includeDeleted) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelByNameForTeamName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelByNameForTeamName' +type MockAPI_GetChannelByNameForTeamName_Call struct { + *mock.Call +} + +// GetChannelByNameForTeamName is a helper method to define mock.On call +// - teamName string +// - channelName string +// - includeDeleted bool +func (_e *MockAPI_Expecter) GetChannelByNameForTeamName(teamName interface{}, channelName interface{}, includeDeleted interface{}) *MockAPI_GetChannelByNameForTeamName_Call { + return &MockAPI_GetChannelByNameForTeamName_Call{Call: _e.mock.On("GetChannelByNameForTeamName", teamName, channelName, includeDeleted)} +} + +func (_c *MockAPI_GetChannelByNameForTeamName_Call) Run(run func(teamName string, channelName string, includeDeleted bool)) *MockAPI_GetChannelByNameForTeamName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(bool)) + }) + return _c +} + +func (_c *MockAPI_GetChannelByNameForTeamName_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_GetChannelByNameForTeamName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelByNameForTeamName_Call) RunAndReturn(run func(string, string, bool) (*model.Channel, *model.AppError)) *MockAPI_GetChannelByNameForTeamName_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelMember provides a mock function with given fields: channelId, userID +func (_m *MockAPI) GetChannelMember(channelId string, userID string) (*model.ChannelMember, *model.AppError) { + ret := _m.Called(channelId, userID) + + if len(ret) == 0 { + panic("no return value specified for GetChannelMember") + } + + var r0 *model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelMember, *model.AppError)); ok { + return rf(channelId, userID) + } + if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { + r0 = rf(channelId, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(channelId, userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelMember' +type MockAPI_GetChannelMember_Call struct { + *mock.Call +} + +// GetChannelMember is a helper method to define mock.On call +// - channelId string +// - userID string +func (_e *MockAPI_Expecter) GetChannelMember(channelId interface{}, userID interface{}) *MockAPI_GetChannelMember_Call { + return &MockAPI_GetChannelMember_Call{Call: _e.mock.On("GetChannelMember", channelId, userID)} +} + +func (_c *MockAPI_GetChannelMember_Call) Run(run func(channelId string, userID string)) *MockAPI_GetChannelMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_GetChannelMember_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_GetChannelMember_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelMember_Call) RunAndReturn(run func(string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_GetChannelMember_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelMembers provides a mock function with given fields: channelId, page, perPage +func (_m *MockAPI) GetChannelMembers(channelId string, page int, perPage int) (model.ChannelMembers, *model.AppError) { + ret := _m.Called(channelId, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetChannelMembers") + } + + var r0 model.ChannelMembers + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelMembers, *model.AppError)); ok { + return rf(channelId, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) model.ChannelMembers); ok { + r0 = rf(channelId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(model.ChannelMembers) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(channelId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelMembers' +type MockAPI_GetChannelMembers_Call struct { + *mock.Call +} + +// GetChannelMembers is a helper method to define mock.On call +// - channelId string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetChannelMembers(channelId interface{}, page interface{}, perPage interface{}) *MockAPI_GetChannelMembers_Call { + return &MockAPI_GetChannelMembers_Call{Call: _e.mock.On("GetChannelMembers", channelId, page, perPage)} +} + +func (_c *MockAPI_GetChannelMembers_Call) Run(run func(channelId string, page int, perPage int)) *MockAPI_GetChannelMembers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetChannelMembers_Call) Return(_a0 model.ChannelMembers, _a1 *model.AppError) *MockAPI_GetChannelMembers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelMembers_Call) RunAndReturn(run func(string, int, int) (model.ChannelMembers, *model.AppError)) *MockAPI_GetChannelMembers_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelMembersByIds provides a mock function with given fields: channelId, userIds +func (_m *MockAPI) GetChannelMembersByIds(channelId string, userIds []string) (model.ChannelMembers, *model.AppError) { + ret := _m.Called(channelId, userIds) + + if len(ret) == 0 { + panic("no return value specified for GetChannelMembersByIds") + } + + var r0 model.ChannelMembers + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []string) (model.ChannelMembers, *model.AppError)); ok { + return rf(channelId, userIds) + } + if rf, ok := ret.Get(0).(func(string, []string) model.ChannelMembers); ok { + r0 = rf(channelId, userIds) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(model.ChannelMembers) + } + } + + if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { + r1 = rf(channelId, userIds) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelMembersByIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelMembersByIds' +type MockAPI_GetChannelMembersByIds_Call struct { + *mock.Call +} + +// GetChannelMembersByIds is a helper method to define mock.On call +// - channelId string +// - userIds []string +func (_e *MockAPI_Expecter) GetChannelMembersByIds(channelId interface{}, userIds interface{}) *MockAPI_GetChannelMembersByIds_Call { + return &MockAPI_GetChannelMembersByIds_Call{Call: _e.mock.On("GetChannelMembersByIds", channelId, userIds)} +} + +func (_c *MockAPI_GetChannelMembersByIds_Call) Run(run func(channelId string, userIds []string)) *MockAPI_GetChannelMembersByIds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetChannelMembersByIds_Call) Return(_a0 model.ChannelMembers, _a1 *model.AppError) *MockAPI_GetChannelMembersByIds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelMembersByIds_Call) RunAndReturn(run func(string, []string) (model.ChannelMembers, *model.AppError)) *MockAPI_GetChannelMembersByIds_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelMembersForUser provides a mock function with given fields: teamID, userID, page, perPage +func (_m *MockAPI) GetChannelMembersForUser(teamID string, userID string, page int, perPage int) ([]*model.ChannelMember, *model.AppError) { + ret := _m.Called(teamID, userID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetChannelMembersForUser") + } + + var r0 []*model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.ChannelMember, *model.AppError)); ok { + return rf(teamID, userID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.ChannelMember); ok { + r0 = rf(teamID, userID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { + r1 = rf(teamID, userID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelMembersForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelMembersForUser' +type MockAPI_GetChannelMembersForUser_Call struct { + *mock.Call +} + +// GetChannelMembersForUser is a helper method to define mock.On call +// - teamID string +// - userID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetChannelMembersForUser(teamID interface{}, userID interface{}, page interface{}, perPage interface{}) *MockAPI_GetChannelMembersForUser_Call { + return &MockAPI_GetChannelMembersForUser_Call{Call: _e.mock.On("GetChannelMembersForUser", teamID, userID, page, perPage)} +} + +func (_c *MockAPI_GetChannelMembersForUser_Call) Run(run func(teamID string, userID string, page int, perPage int)) *MockAPI_GetChannelMembersForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *MockAPI_GetChannelMembersForUser_Call) Return(_a0 []*model.ChannelMember, _a1 *model.AppError) *MockAPI_GetChannelMembersForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelMembersForUser_Call) RunAndReturn(run func(string, string, int, int) ([]*model.ChannelMember, *model.AppError)) *MockAPI_GetChannelMembersForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelSidebarCategories provides a mock function with given fields: userID, teamID +func (_m *MockAPI) GetChannelSidebarCategories(userID string, teamID string) (*model.OrderedSidebarCategories, *model.AppError) { + ret := _m.Called(userID, teamID) + + if len(ret) == 0 { + panic("no return value specified for GetChannelSidebarCategories") + } + + var r0 *model.OrderedSidebarCategories + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.OrderedSidebarCategories, *model.AppError)); ok { + return rf(userID, teamID) + } + if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok { + r0 = rf(userID, teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.OrderedSidebarCategories) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(userID, teamID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelSidebarCategories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelSidebarCategories' +type MockAPI_GetChannelSidebarCategories_Call struct { + *mock.Call +} + +// GetChannelSidebarCategories is a helper method to define mock.On call +// - userID string +// - teamID string +func (_e *MockAPI_Expecter) GetChannelSidebarCategories(userID interface{}, teamID interface{}) *MockAPI_GetChannelSidebarCategories_Call { + return &MockAPI_GetChannelSidebarCategories_Call{Call: _e.mock.On("GetChannelSidebarCategories", userID, teamID)} +} + +func (_c *MockAPI_GetChannelSidebarCategories_Call) Run(run func(userID string, teamID string)) *MockAPI_GetChannelSidebarCategories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_GetChannelSidebarCategories_Call) Return(_a0 *model.OrderedSidebarCategories, _a1 *model.AppError) *MockAPI_GetChannelSidebarCategories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelSidebarCategories_Call) RunAndReturn(run func(string, string) (*model.OrderedSidebarCategories, *model.AppError)) *MockAPI_GetChannelSidebarCategories_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelStats provides a mock function with given fields: channelId +func (_m *MockAPI) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) { + ret := _m.Called(channelId) + + if len(ret) == 0 { + panic("no return value specified for GetChannelStats") + } + + var r0 *model.ChannelStats + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.ChannelStats, *model.AppError)); ok { + return rf(channelId) + } + if rf, ok := ret.Get(0).(func(string) *model.ChannelStats); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelStats) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(channelId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelStats' +type MockAPI_GetChannelStats_Call struct { + *mock.Call +} + +// GetChannelStats is a helper method to define mock.On call +// - channelId string +func (_e *MockAPI_Expecter) GetChannelStats(channelId interface{}) *MockAPI_GetChannelStats_Call { + return &MockAPI_GetChannelStats_Call{Call: _e.mock.On("GetChannelStats", channelId)} +} + +func (_c *MockAPI_GetChannelStats_Call) Run(run func(channelId string)) *MockAPI_GetChannelStats_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetChannelStats_Call) Return(_a0 *model.ChannelStats, _a1 *model.AppError) *MockAPI_GetChannelStats_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelStats_Call) RunAndReturn(run func(string) (*model.ChannelStats, *model.AppError)) *MockAPI_GetChannelStats_Call { + _c.Call.Return(run) + return _c +} + +// GetChannelsForTeamForUser provides a mock function with given fields: teamID, userID, includeDeleted +func (_m *MockAPI) GetChannelsForTeamForUser(teamID string, userID string, includeDeleted bool) ([]*model.Channel, *model.AppError) { + ret := _m.Called(teamID, userID, includeDeleted) + + if len(ret) == 0 { + panic("no return value specified for GetChannelsForTeamForUser") + } + + var r0 []*model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, bool) ([]*model.Channel, *model.AppError)); ok { + return rf(teamID, userID, includeDeleted) + } + if rf, ok := ret.Get(0).(func(string, string, bool) []*model.Channel); ok { + r0 = rf(teamID, userID, includeDeleted) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { + r1 = rf(teamID, userID, includeDeleted) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetChannelsForTeamForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelsForTeamForUser' +type MockAPI_GetChannelsForTeamForUser_Call struct { + *mock.Call +} + +// GetChannelsForTeamForUser is a helper method to define mock.On call +// - teamID string +// - userID string +// - includeDeleted bool +func (_e *MockAPI_Expecter) GetChannelsForTeamForUser(teamID interface{}, userID interface{}, includeDeleted interface{}) *MockAPI_GetChannelsForTeamForUser_Call { + return &MockAPI_GetChannelsForTeamForUser_Call{Call: _e.mock.On("GetChannelsForTeamForUser", teamID, userID, includeDeleted)} +} + +func (_c *MockAPI_GetChannelsForTeamForUser_Call) Run(run func(teamID string, userID string, includeDeleted bool)) *MockAPI_GetChannelsForTeamForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(bool)) + }) + return _c +} + +func (_c *MockAPI_GetChannelsForTeamForUser_Call) Return(_a0 []*model.Channel, _a1 *model.AppError) *MockAPI_GetChannelsForTeamForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetChannelsForTeamForUser_Call) RunAndReturn(run func(string, string, bool) ([]*model.Channel, *model.AppError)) *MockAPI_GetChannelsForTeamForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetCloudLimits provides a mock function with given fields: +func (_m *MockAPI) GetCloudLimits() (*model.ProductLimits, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetCloudLimits") + } + + var r0 *model.ProductLimits + var r1 error + if rf, ok := ret.Get(0).(func() (*model.ProductLimits, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *model.ProductLimits); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ProductLimits) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_GetCloudLimits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCloudLimits' +type MockAPI_GetCloudLimits_Call struct { + *mock.Call +} + +// GetCloudLimits is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetCloudLimits() *MockAPI_GetCloudLimits_Call { + return &MockAPI_GetCloudLimits_Call{Call: _e.mock.On("GetCloudLimits")} +} + +func (_c *MockAPI_GetCloudLimits_Call) Run(run func()) *MockAPI_GetCloudLimits_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetCloudLimits_Call) Return(_a0 *model.ProductLimits, _a1 error) *MockAPI_GetCloudLimits_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetCloudLimits_Call) RunAndReturn(run func() (*model.ProductLimits, error)) *MockAPI_GetCloudLimits_Call { + _c.Call.Return(run) + return _c +} + +// GetCommand provides a mock function with given fields: commandID +func (_m *MockAPI) GetCommand(commandID string) (*model.Command, error) { + ret := _m.Called(commandID) + + if len(ret) == 0 { + panic("no return value specified for GetCommand") + } + + var r0 *model.Command + var r1 error + if rf, ok := ret.Get(0).(func(string) (*model.Command, error)); ok { + return rf(commandID) + } + if rf, ok := ret.Get(0).(func(string) *model.Command); ok { + r0 = rf(commandID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(commandID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_GetCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommand' +type MockAPI_GetCommand_Call struct { + *mock.Call +} + +// GetCommand is a helper method to define mock.On call +// - commandID string +func (_e *MockAPI_Expecter) GetCommand(commandID interface{}) *MockAPI_GetCommand_Call { + return &MockAPI_GetCommand_Call{Call: _e.mock.On("GetCommand", commandID)} +} + +func (_c *MockAPI_GetCommand_Call) Run(run func(commandID string)) *MockAPI_GetCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetCommand_Call) Return(_a0 *model.Command, _a1 error) *MockAPI_GetCommand_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetCommand_Call) RunAndReturn(run func(string) (*model.Command, error)) *MockAPI_GetCommand_Call { + _c.Call.Return(run) + return _c +} + +// GetConfig provides a mock function with given fields: +func (_m *MockAPI) GetConfig() *model.Config { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + + var r0 *model.Config + if rf, ok := ret.Get(0).(func() *model.Config); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Config) + } + } + + return r0 +} + +// MockAPI_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' +type MockAPI_GetConfig_Call struct { + *mock.Call +} + +// GetConfig is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetConfig() *MockAPI_GetConfig_Call { + return &MockAPI_GetConfig_Call{Call: _e.mock.On("GetConfig")} +} + +func (_c *MockAPI_GetConfig_Call) Run(run func()) *MockAPI_GetConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetConfig_Call) Return(_a0 *model.Config) *MockAPI_GetConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetConfig_Call) RunAndReturn(run func() *model.Config) *MockAPI_GetConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetDiagnosticId provides a mock function with given fields: +func (_m *MockAPI) GetDiagnosticId() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDiagnosticId") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockAPI_GetDiagnosticId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDiagnosticId' +type MockAPI_GetDiagnosticId_Call struct { + *mock.Call +} + +// GetDiagnosticId is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetDiagnosticId() *MockAPI_GetDiagnosticId_Call { + return &MockAPI_GetDiagnosticId_Call{Call: _e.mock.On("GetDiagnosticId")} +} + +func (_c *MockAPI_GetDiagnosticId_Call) Run(run func()) *MockAPI_GetDiagnosticId_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetDiagnosticId_Call) Return(_a0 string) *MockAPI_GetDiagnosticId_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetDiagnosticId_Call) RunAndReturn(run func() string) *MockAPI_GetDiagnosticId_Call { + _c.Call.Return(run) + return _c +} + +// GetDirectChannel provides a mock function with given fields: userId1, userId2 +func (_m *MockAPI) GetDirectChannel(userId1 string, userId2 string) (*model.Channel, *model.AppError) { + ret := _m.Called(userId1, userId2) + + if len(ret) == 0 { + panic("no return value specified for GetDirectChannel") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.Channel, *model.AppError)); ok { + return rf(userId1, userId2) + } + if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { + r0 = rf(userId1, userId2) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(userId1, userId2) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetDirectChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirectChannel' +type MockAPI_GetDirectChannel_Call struct { + *mock.Call +} + +// GetDirectChannel is a helper method to define mock.On call +// - userId1 string +// - userId2 string +func (_e *MockAPI_Expecter) GetDirectChannel(userId1 interface{}, userId2 interface{}) *MockAPI_GetDirectChannel_Call { + return &MockAPI_GetDirectChannel_Call{Call: _e.mock.On("GetDirectChannel", userId1, userId2)} +} + +func (_c *MockAPI_GetDirectChannel_Call) Run(run func(userId1 string, userId2 string)) *MockAPI_GetDirectChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_GetDirectChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_GetDirectChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetDirectChannel_Call) RunAndReturn(run func(string, string) (*model.Channel, *model.AppError)) *MockAPI_GetDirectChannel_Call { + _c.Call.Return(run) + return _c +} + +// GetEmoji provides a mock function with given fields: emojiId +func (_m *MockAPI) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) { + ret := _m.Called(emojiId) + + if len(ret) == 0 { + panic("no return value specified for GetEmoji") + } + + var r0 *model.Emoji + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Emoji, *model.AppError)); ok { + return rf(emojiId) + } + if rf, ok := ret.Get(0).(func(string) *model.Emoji); ok { + r0 = rf(emojiId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Emoji) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(emojiId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetEmoji_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEmoji' +type MockAPI_GetEmoji_Call struct { + *mock.Call +} + +// GetEmoji is a helper method to define mock.On call +// - emojiId string +func (_e *MockAPI_Expecter) GetEmoji(emojiId interface{}) *MockAPI_GetEmoji_Call { + return &MockAPI_GetEmoji_Call{Call: _e.mock.On("GetEmoji", emojiId)} +} + +func (_c *MockAPI_GetEmoji_Call) Run(run func(emojiId string)) *MockAPI_GetEmoji_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetEmoji_Call) Return(_a0 *model.Emoji, _a1 *model.AppError) *MockAPI_GetEmoji_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetEmoji_Call) RunAndReturn(run func(string) (*model.Emoji, *model.AppError)) *MockAPI_GetEmoji_Call { + _c.Call.Return(run) + return _c +} + +// GetEmojiByName provides a mock function with given fields: name +func (_m *MockAPI) GetEmojiByName(name string) (*model.Emoji, *model.AppError) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for GetEmojiByName") + } + + var r0 *model.Emoji + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Emoji, *model.AppError)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) *model.Emoji); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Emoji) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(name) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetEmojiByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEmojiByName' +type MockAPI_GetEmojiByName_Call struct { + *mock.Call +} + +// GetEmojiByName is a helper method to define mock.On call +// - name string +func (_e *MockAPI_Expecter) GetEmojiByName(name interface{}) *MockAPI_GetEmojiByName_Call { + return &MockAPI_GetEmojiByName_Call{Call: _e.mock.On("GetEmojiByName", name)} +} + +func (_c *MockAPI_GetEmojiByName_Call) Run(run func(name string)) *MockAPI_GetEmojiByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetEmojiByName_Call) Return(_a0 *model.Emoji, _a1 *model.AppError) *MockAPI_GetEmojiByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetEmojiByName_Call) RunAndReturn(run func(string) (*model.Emoji, *model.AppError)) *MockAPI_GetEmojiByName_Call { + _c.Call.Return(run) + return _c +} + +// GetEmojiImage provides a mock function with given fields: emojiId +func (_m *MockAPI) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) { + ret := _m.Called(emojiId) + + if len(ret) == 0 { + panic("no return value specified for GetEmojiImage") + } + + var r0 []byte + var r1 string + var r2 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, string, *model.AppError)); ok { + return rf(emojiId) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(emojiId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(string) string); ok { + r1 = rf(emojiId) + } else { + r1 = ret.Get(1).(string) + } + + if rf, ok := ret.Get(2).(func(string) *model.AppError); ok { + r2 = rf(emojiId) + } else { + if ret.Get(2) != nil { + r2 = ret.Get(2).(*model.AppError) + } + } + + return r0, r1, r2 +} + +// MockAPI_GetEmojiImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEmojiImage' +type MockAPI_GetEmojiImage_Call struct { + *mock.Call +} + +// GetEmojiImage is a helper method to define mock.On call +// - emojiId string +func (_e *MockAPI_Expecter) GetEmojiImage(emojiId interface{}) *MockAPI_GetEmojiImage_Call { + return &MockAPI_GetEmojiImage_Call{Call: _e.mock.On("GetEmojiImage", emojiId)} +} + +func (_c *MockAPI_GetEmojiImage_Call) Run(run func(emojiId string)) *MockAPI_GetEmojiImage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetEmojiImage_Call) Return(_a0 []byte, _a1 string, _a2 *model.AppError) *MockAPI_GetEmojiImage_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *MockAPI_GetEmojiImage_Call) RunAndReturn(run func(string) ([]byte, string, *model.AppError)) *MockAPI_GetEmojiImage_Call { + _c.Call.Return(run) + return _c +} + +// GetEmojiList provides a mock function with given fields: sortBy, page, perPage +func (_m *MockAPI) GetEmojiList(sortBy string, page int, perPage int) ([]*model.Emoji, *model.AppError) { + ret := _m.Called(sortBy, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetEmojiList") + } + + var r0 []*model.Emoji + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Emoji, *model.AppError)); ok { + return rf(sortBy, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.Emoji); ok { + r0 = rf(sortBy, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Emoji) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(sortBy, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetEmojiList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEmojiList' +type MockAPI_GetEmojiList_Call struct { + *mock.Call +} + +// GetEmojiList is a helper method to define mock.On call +// - sortBy string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetEmojiList(sortBy interface{}, page interface{}, perPage interface{}) *MockAPI_GetEmojiList_Call { + return &MockAPI_GetEmojiList_Call{Call: _e.mock.On("GetEmojiList", sortBy, page, perPage)} +} + +func (_c *MockAPI_GetEmojiList_Call) Run(run func(sortBy string, page int, perPage int)) *MockAPI_GetEmojiList_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetEmojiList_Call) Return(_a0 []*model.Emoji, _a1 *model.AppError) *MockAPI_GetEmojiList_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetEmojiList_Call) RunAndReturn(run func(string, int, int) ([]*model.Emoji, *model.AppError)) *MockAPI_GetEmojiList_Call { + _c.Call.Return(run) + return _c +} + +// GetFile provides a mock function with given fields: fileId +func (_m *MockAPI) GetFile(fileId string) ([]byte, *model.AppError) { + ret := _m.Called(fileId) + + if len(ret) == 0 { + panic("no return value specified for GetFile") + } + + var r0 []byte + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { + return rf(fileId) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(fileId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + 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 +} + +// MockAPI_GetFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFile' +type MockAPI_GetFile_Call struct { + *mock.Call +} + +// GetFile is a helper method to define mock.On call +// - fileId string +func (_e *MockAPI_Expecter) GetFile(fileId interface{}) *MockAPI_GetFile_Call { + return &MockAPI_GetFile_Call{Call: _e.mock.On("GetFile", fileId)} +} + +func (_c *MockAPI_GetFile_Call) Run(run func(fileId string)) *MockAPI_GetFile_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetFile_Call) Return(_a0 []byte, _a1 *model.AppError) *MockAPI_GetFile_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetFile_Call) RunAndReturn(run func(string) ([]byte, *model.AppError)) *MockAPI_GetFile_Call { + _c.Call.Return(run) + return _c +} + +// GetFileInfo provides a mock function with given fields: fileId +func (_m *MockAPI) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { + ret := _m.Called(fileId) + + if len(ret) == 0 { + panic("no return value specified for GetFileInfo") + } + + var r0 *model.FileInfo + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, *model.AppError)); ok { + return rf(fileId) + } + if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok { + r0 = rf(fileId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.FileInfo) + } + } + + 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 +} + +// MockAPI_GetFileInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFileInfo' +type MockAPI_GetFileInfo_Call struct { + *mock.Call +} + +// GetFileInfo is a helper method to define mock.On call +// - fileId string +func (_e *MockAPI_Expecter) GetFileInfo(fileId interface{}) *MockAPI_GetFileInfo_Call { + return &MockAPI_GetFileInfo_Call{Call: _e.mock.On("GetFileInfo", fileId)} +} + +func (_c *MockAPI_GetFileInfo_Call) Run(run func(fileId string)) *MockAPI_GetFileInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetFileInfo_Call) Return(_a0 *model.FileInfo, _a1 *model.AppError) *MockAPI_GetFileInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetFileInfo_Call) RunAndReturn(run func(string) (*model.FileInfo, *model.AppError)) *MockAPI_GetFileInfo_Call { + _c.Call.Return(run) + return _c +} + +// GetFileInfos provides a mock function with given fields: page, perPage, opt +func (_m *MockAPI) GetFileInfos(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError) { + ret := _m.Called(page, perPage, opt) + + if len(ret) == 0 { + panic("no return value specified for GetFileInfos") + } + + var r0 []*model.FileInfo + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)); ok { + return rf(page, perPage, opt) + } + if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) []*model.FileInfo); ok { + r0 = rf(page, perPage, opt) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.FileInfo) + } + } + + if rf, ok := ret.Get(1).(func(int, int, *model.GetFileInfosOptions) *model.AppError); ok { + r1 = rf(page, perPage, opt) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetFileInfos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFileInfos' +type MockAPI_GetFileInfos_Call struct { + *mock.Call +} + +// GetFileInfos is a helper method to define mock.On call +// - page int +// - perPage int +// - opt *model.GetFileInfosOptions +func (_e *MockAPI_Expecter) GetFileInfos(page interface{}, perPage interface{}, opt interface{}) *MockAPI_GetFileInfos_Call { + return &MockAPI_GetFileInfos_Call{Call: _e.mock.On("GetFileInfos", page, perPage, opt)} +} + +func (_c *MockAPI_GetFileInfos_Call) Run(run func(page int, perPage int, opt *model.GetFileInfosOptions)) *MockAPI_GetFileInfos_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int), args[1].(int), args[2].(*model.GetFileInfosOptions)) + }) + return _c +} + +func (_c *MockAPI_GetFileInfos_Call) Return(_a0 []*model.FileInfo, _a1 *model.AppError) *MockAPI_GetFileInfos_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetFileInfos_Call) RunAndReturn(run func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)) *MockAPI_GetFileInfos_Call { + _c.Call.Return(run) + return _c +} + +// GetFileLink provides a mock function with given fields: fileId +func (_m *MockAPI) GetFileLink(fileId string) (string, *model.AppError) { + ret := _m.Called(fileId) + + if len(ret) == 0 { + panic("no return value specified for GetFileLink") + } + + var r0 string + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (string, *model.AppError)); ok { + return rf(fileId) + } + if rf, ok := ret.Get(0).(func(string) string); ok { + r0 = rf(fileId) + } else { + r0 = ret.Get(0).(string) + } + + 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 +} + +// MockAPI_GetFileLink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFileLink' +type MockAPI_GetFileLink_Call struct { + *mock.Call +} + +// GetFileLink is a helper method to define mock.On call +// - fileId string +func (_e *MockAPI_Expecter) GetFileLink(fileId interface{}) *MockAPI_GetFileLink_Call { + return &MockAPI_GetFileLink_Call{Call: _e.mock.On("GetFileLink", fileId)} +} + +func (_c *MockAPI_GetFileLink_Call) Run(run func(fileId string)) *MockAPI_GetFileLink_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetFileLink_Call) Return(_a0 string, _a1 *model.AppError) *MockAPI_GetFileLink_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetFileLink_Call) RunAndReturn(run func(string) (string, *model.AppError)) *MockAPI_GetFileLink_Call { + _c.Call.Return(run) + return _c +} + +// GetGroup provides a mock function with given fields: groupId +func (_m *MockAPI) GetGroup(groupId string) (*model.Group, *model.AppError) { + ret := _m.Called(groupId) + + if len(ret) == 0 { + panic("no return value specified for GetGroup") + } + + var r0 *model.Group + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok { + return rf(groupId) + } + if rf, ok := ret.Get(0).(func(string) *model.Group); ok { + r0 = rf(groupId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Group) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(groupId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroup' +type MockAPI_GetGroup_Call struct { + *mock.Call +} + +// GetGroup is a helper method to define mock.On call +// - groupId string +func (_e *MockAPI_Expecter) GetGroup(groupId interface{}) *MockAPI_GetGroup_Call { + return &MockAPI_GetGroup_Call{Call: _e.mock.On("GetGroup", groupId)} +} + +func (_c *MockAPI_GetGroup_Call) Run(run func(groupId string)) *MockAPI_GetGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetGroup_Call) Return(_a0 *model.Group, _a1 *model.AppError) *MockAPI_GetGroup_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroup_Call) RunAndReturn(run func(string) (*model.Group, *model.AppError)) *MockAPI_GetGroup_Call { + _c.Call.Return(run) + return _c +} + +// GetGroupByName provides a mock function with given fields: name +func (_m *MockAPI) GetGroupByName(name string) (*model.Group, *model.AppError) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for GetGroupByName") + } + + var r0 *model.Group + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) *model.Group); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Group) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(name) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroupByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupByName' +type MockAPI_GetGroupByName_Call struct { + *mock.Call +} + +// GetGroupByName is a helper method to define mock.On call +// - name string +func (_e *MockAPI_Expecter) GetGroupByName(name interface{}) *MockAPI_GetGroupByName_Call { + return &MockAPI_GetGroupByName_Call{Call: _e.mock.On("GetGroupByName", name)} +} + +func (_c *MockAPI_GetGroupByName_Call) Run(run func(name string)) *MockAPI_GetGroupByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetGroupByName_Call) Return(_a0 *model.Group, _a1 *model.AppError) *MockAPI_GetGroupByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroupByName_Call) RunAndReturn(run func(string) (*model.Group, *model.AppError)) *MockAPI_GetGroupByName_Call { + _c.Call.Return(run) + return _c +} + +// GetGroupChannel provides a mock function with given fields: userIds +func (_m *MockAPI) GetGroupChannel(userIds []string) (*model.Channel, *model.AppError) { + ret := _m.Called(userIds) + + if len(ret) == 0 { + panic("no return value specified for GetGroupChannel") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func([]string) (*model.Channel, *model.AppError)); ok { + return rf(userIds) + } + if rf, ok := ret.Get(0).(func([]string) *model.Channel); ok { + r0 = rf(userIds) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { + r1 = rf(userIds) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroupChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupChannel' +type MockAPI_GetGroupChannel_Call struct { + *mock.Call +} + +// GetGroupChannel is a helper method to define mock.On call +// - userIds []string +func (_e *MockAPI_Expecter) GetGroupChannel(userIds interface{}) *MockAPI_GetGroupChannel_Call { + return &MockAPI_GetGroupChannel_Call{Call: _e.mock.On("GetGroupChannel", userIds)} +} + +func (_c *MockAPI_GetGroupChannel_Call) Run(run func(userIds []string)) *MockAPI_GetGroupChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetGroupChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_GetGroupChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroupChannel_Call) RunAndReturn(run func([]string) (*model.Channel, *model.AppError)) *MockAPI_GetGroupChannel_Call { + _c.Call.Return(run) + return _c +} + +// GetGroupMemberUsers provides a mock function with given fields: groupID, page, perPage +func (_m *MockAPI) GetGroupMemberUsers(groupID string, page int, perPage int) ([]*model.User, *model.AppError) { + ret := _m.Called(groupID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetGroupMemberUsers") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.User, *model.AppError)); ok { + return rf(groupID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.User); ok { + r0 = rf(groupID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(groupID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroupMemberUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupMemberUsers' +type MockAPI_GetGroupMemberUsers_Call struct { + *mock.Call +} + +// GetGroupMemberUsers is a helper method to define mock.On call +// - groupID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetGroupMemberUsers(groupID interface{}, page interface{}, perPage interface{}) *MockAPI_GetGroupMemberUsers_Call { + return &MockAPI_GetGroupMemberUsers_Call{Call: _e.mock.On("GetGroupMemberUsers", groupID, page, perPage)} +} + +func (_c *MockAPI_GetGroupMemberUsers_Call) Run(run func(groupID string, page int, perPage int)) *MockAPI_GetGroupMemberUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetGroupMemberUsers_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetGroupMemberUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroupMemberUsers_Call) RunAndReturn(run func(string, int, int) ([]*model.User, *model.AppError)) *MockAPI_GetGroupMemberUsers_Call { + _c.Call.Return(run) + return _c +} + +// GetGroupsBySource provides a mock function with given fields: groupSource +func (_m *MockAPI) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) { + ret := _m.Called(groupSource) + + if len(ret) == 0 { + panic("no return value specified for GetGroupsBySource") + } + + var r0 []*model.Group + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(model.GroupSource) ([]*model.Group, *model.AppError)); ok { + return rf(groupSource) + } + if rf, ok := ret.Get(0).(func(model.GroupSource) []*model.Group); ok { + r0 = rf(groupSource) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Group) + } + } + + if rf, ok := ret.Get(1).(func(model.GroupSource) *model.AppError); ok { + r1 = rf(groupSource) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroupsBySource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupsBySource' +type MockAPI_GetGroupsBySource_Call struct { + *mock.Call +} + +// GetGroupsBySource is a helper method to define mock.On call +// - groupSource model.GroupSource +func (_e *MockAPI_Expecter) GetGroupsBySource(groupSource interface{}) *MockAPI_GetGroupsBySource_Call { + return &MockAPI_GetGroupsBySource_Call{Call: _e.mock.On("GetGroupsBySource", groupSource)} +} + +func (_c *MockAPI_GetGroupsBySource_Call) Run(run func(groupSource model.GroupSource)) *MockAPI_GetGroupsBySource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.GroupSource)) + }) + return _c +} + +func (_c *MockAPI_GetGroupsBySource_Call) Return(_a0 []*model.Group, _a1 *model.AppError) *MockAPI_GetGroupsBySource_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroupsBySource_Call) RunAndReturn(run func(model.GroupSource) ([]*model.Group, *model.AppError)) *MockAPI_GetGroupsBySource_Call { + _c.Call.Return(run) + return _c +} + +// GetGroupsForUser provides a mock function with given fields: userID +func (_m *MockAPI) GetGroupsForUser(userID string) ([]*model.Group, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetGroupsForUser") + } + + var r0 []*model.Group + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]*model.Group, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) []*model.Group); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Group) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetGroupsForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupsForUser' +type MockAPI_GetGroupsForUser_Call struct { + *mock.Call +} + +// GetGroupsForUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetGroupsForUser(userID interface{}) *MockAPI_GetGroupsForUser_Call { + return &MockAPI_GetGroupsForUser_Call{Call: _e.mock.On("GetGroupsForUser", userID)} +} + +func (_c *MockAPI_GetGroupsForUser_Call) Run(run func(userID string)) *MockAPI_GetGroupsForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetGroupsForUser_Call) Return(_a0 []*model.Group, _a1 *model.AppError) *MockAPI_GetGroupsForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetGroupsForUser_Call) RunAndReturn(run func(string) ([]*model.Group, *model.AppError)) *MockAPI_GetGroupsForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetLDAPUserAttributes provides a mock function with given fields: userID, attributes +func (_m *MockAPI) GetLDAPUserAttributes(userID string, attributes []string) (map[string]string, *model.AppError) { + ret := _m.Called(userID, attributes) + + if len(ret) == 0 { + panic("no return value specified for GetLDAPUserAttributes") + } + + var r0 map[string]string + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []string) (map[string]string, *model.AppError)); ok { + return rf(userID, attributes) + } + if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok { + r0 = rf(userID, attributes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]string) + } + } + + if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { + r1 = rf(userID, attributes) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetLDAPUserAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLDAPUserAttributes' +type MockAPI_GetLDAPUserAttributes_Call struct { + *mock.Call +} + +// GetLDAPUserAttributes is a helper method to define mock.On call +// - userID string +// - attributes []string +func (_e *MockAPI_Expecter) GetLDAPUserAttributes(userID interface{}, attributes interface{}) *MockAPI_GetLDAPUserAttributes_Call { + return &MockAPI_GetLDAPUserAttributes_Call{Call: _e.mock.On("GetLDAPUserAttributes", userID, attributes)} +} + +func (_c *MockAPI_GetLDAPUserAttributes_Call) Run(run func(userID string, attributes []string)) *MockAPI_GetLDAPUserAttributes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetLDAPUserAttributes_Call) Return(_a0 map[string]string, _a1 *model.AppError) *MockAPI_GetLDAPUserAttributes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetLDAPUserAttributes_Call) RunAndReturn(run func(string, []string) (map[string]string, *model.AppError)) *MockAPI_GetLDAPUserAttributes_Call { + _c.Call.Return(run) + return _c +} + +// GetLicense provides a mock function with given fields: +func (_m *MockAPI) GetLicense() *model.License { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLicense") + } + + var r0 *model.License + if rf, ok := ret.Get(0).(func() *model.License); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.License) + } + } + + return r0 +} + +// MockAPI_GetLicense_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLicense' +type MockAPI_GetLicense_Call struct { + *mock.Call +} + +// GetLicense is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetLicense() *MockAPI_GetLicense_Call { + return &MockAPI_GetLicense_Call{Call: _e.mock.On("GetLicense")} +} + +func (_c *MockAPI_GetLicense_Call) Run(run func()) *MockAPI_GetLicense_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetLicense_Call) Return(_a0 *model.License) *MockAPI_GetLicense_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetLicense_Call) RunAndReturn(run func() *model.License) *MockAPI_GetLicense_Call { + _c.Call.Return(run) + return _c +} + +// GetOAuthApp provides a mock function with given fields: appID +func (_m *MockAPI) GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError) { + ret := _m.Called(appID) + + if len(ret) == 0 { + panic("no return value specified for GetOAuthApp") + } + + var r0 *model.OAuthApp + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.OAuthApp, *model.AppError)); ok { + return rf(appID) + } + if rf, ok := ret.Get(0).(func(string) *model.OAuthApp); ok { + r0 = rf(appID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.OAuthApp) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(appID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetOAuthApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOAuthApp' +type MockAPI_GetOAuthApp_Call struct { + *mock.Call +} + +// GetOAuthApp is a helper method to define mock.On call +// - appID string +func (_e *MockAPI_Expecter) GetOAuthApp(appID interface{}) *MockAPI_GetOAuthApp_Call { + return &MockAPI_GetOAuthApp_Call{Call: _e.mock.On("GetOAuthApp", appID)} +} + +func (_c *MockAPI_GetOAuthApp_Call) Run(run func(appID string)) *MockAPI_GetOAuthApp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetOAuthApp_Call) Return(_a0 *model.OAuthApp, _a1 *model.AppError) *MockAPI_GetOAuthApp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetOAuthApp_Call) RunAndReturn(run func(string) (*model.OAuthApp, *model.AppError)) *MockAPI_GetOAuthApp_Call { + _c.Call.Return(run) + return _c +} + +// GetPluginConfig provides a mock function with given fields: +func (_m *MockAPI) GetPluginConfig() map[string]interface{} { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPluginConfig") + } + + var r0 map[string]interface{} + if rf, ok := ret.Get(0).(func() map[string]interface{}); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]interface{}) + } + } + + return r0 +} + +// MockAPI_GetPluginConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPluginConfig' +type MockAPI_GetPluginConfig_Call struct { + *mock.Call +} + +// GetPluginConfig is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetPluginConfig() *MockAPI_GetPluginConfig_Call { + return &MockAPI_GetPluginConfig_Call{Call: _e.mock.On("GetPluginConfig")} +} + +func (_c *MockAPI_GetPluginConfig_Call) Run(run func()) *MockAPI_GetPluginConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetPluginConfig_Call) Return(_a0 map[string]interface{}) *MockAPI_GetPluginConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetPluginConfig_Call) RunAndReturn(run func() map[string]interface{}) *MockAPI_GetPluginConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetPluginStatus provides a mock function with given fields: id +func (_m *MockAPI) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for GetPluginStatus") + } + + var r0 *model.PluginStatus + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.PluginStatus, *model.AppError)); ok { + return rf(id) + } + if rf, ok := ret.Get(0).(func(string) *model.PluginStatus); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PluginStatus) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(id) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPluginStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPluginStatus' +type MockAPI_GetPluginStatus_Call struct { + *mock.Call +} + +// GetPluginStatus is a helper method to define mock.On call +// - id string +func (_e *MockAPI_Expecter) GetPluginStatus(id interface{}) *MockAPI_GetPluginStatus_Call { + return &MockAPI_GetPluginStatus_Call{Call: _e.mock.On("GetPluginStatus", id)} +} + +func (_c *MockAPI_GetPluginStatus_Call) Run(run func(id string)) *MockAPI_GetPluginStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetPluginStatus_Call) Return(_a0 *model.PluginStatus, _a1 *model.AppError) *MockAPI_GetPluginStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPluginStatus_Call) RunAndReturn(run func(string) (*model.PluginStatus, *model.AppError)) *MockAPI_GetPluginStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetPlugins provides a mock function with given fields: +func (_m *MockAPI) GetPlugins() ([]*model.Manifest, *model.AppError) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPlugins") + } + + var r0 []*model.Manifest + var r1 *model.AppError + if rf, ok := ret.Get(0).(func() ([]*model.Manifest, *model.AppError)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []*model.Manifest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Manifest) + } + } + + if rf, ok := ret.Get(1).(func() *model.AppError); ok { + r1 = rf() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPlugins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPlugins' +type MockAPI_GetPlugins_Call struct { + *mock.Call +} + +// GetPlugins is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetPlugins() *MockAPI_GetPlugins_Call { + return &MockAPI_GetPlugins_Call{Call: _e.mock.On("GetPlugins")} +} + +func (_c *MockAPI_GetPlugins_Call) Run(run func()) *MockAPI_GetPlugins_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetPlugins_Call) Return(_a0 []*model.Manifest, _a1 *model.AppError) *MockAPI_GetPlugins_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPlugins_Call) RunAndReturn(run func() ([]*model.Manifest, *model.AppError)) *MockAPI_GetPlugins_Call { + _c.Call.Return(run) + return _c +} + +// GetPost provides a mock function with given fields: postId +func (_m *MockAPI) GetPost(postId string) (*model.Post, *model.AppError) { + ret := _m.Called(postId) + + if len(ret) == 0 { + panic("no return value specified for GetPost") + } + + var r0 *model.Post + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Post, *model.AppError)); ok { + return rf(postId) + } + if rf, ok := ret.Get(0).(func(string) *model.Post); ok { + r0 = rf(postId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Post) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(postId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPost' +type MockAPI_GetPost_Call struct { + *mock.Call +} + +// GetPost is a helper method to define mock.On call +// - postId string +func (_e *MockAPI_Expecter) GetPost(postId interface{}) *MockAPI_GetPost_Call { + return &MockAPI_GetPost_Call{Call: _e.mock.On("GetPost", postId)} +} + +func (_c *MockAPI_GetPost_Call) Run(run func(postId string)) *MockAPI_GetPost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetPost_Call) Return(_a0 *model.Post, _a1 *model.AppError) *MockAPI_GetPost_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPost_Call) RunAndReturn(run func(string) (*model.Post, *model.AppError)) *MockAPI_GetPost_Call { + _c.Call.Return(run) + return _c +} + +// GetPostThread provides a mock function with given fields: postId +func (_m *MockAPI) GetPostThread(postId string) (*model.PostList, *model.AppError) { + ret := _m.Called(postId) + + if len(ret) == 0 { + panic("no return value specified for GetPostThread") + } + + var r0 *model.PostList + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.PostList, *model.AppError)); ok { + return rf(postId) + } + if rf, ok := ret.Get(0).(func(string) *model.PostList); ok { + r0 = rf(postId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(postId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPostThread_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPostThread' +type MockAPI_GetPostThread_Call struct { + *mock.Call +} + +// GetPostThread is a helper method to define mock.On call +// - postId string +func (_e *MockAPI_Expecter) GetPostThread(postId interface{}) *MockAPI_GetPostThread_Call { + return &MockAPI_GetPostThread_Call{Call: _e.mock.On("GetPostThread", postId)} +} + +func (_c *MockAPI_GetPostThread_Call) Run(run func(postId string)) *MockAPI_GetPostThread_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetPostThread_Call) Return(_a0 *model.PostList, _a1 *model.AppError) *MockAPI_GetPostThread_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPostThread_Call) RunAndReturn(run func(string) (*model.PostList, *model.AppError)) *MockAPI_GetPostThread_Call { + _c.Call.Return(run) + return _c +} + +// GetPostsAfter provides a mock function with given fields: channelId, postId, page, perPage +func (_m *MockAPI) GetPostsAfter(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, postId, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetPostsAfter") + } + + var r0 *model.PostList + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, *model.AppError)); ok { + return rf(channelId, postId, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { + r0 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { + r1 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPostsAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPostsAfter' +type MockAPI_GetPostsAfter_Call struct { + *mock.Call +} + +// GetPostsAfter is a helper method to define mock.On call +// - channelId string +// - postId string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetPostsAfter(channelId interface{}, postId interface{}, page interface{}, perPage interface{}) *MockAPI_GetPostsAfter_Call { + return &MockAPI_GetPostsAfter_Call{Call: _e.mock.On("GetPostsAfter", channelId, postId, page, perPage)} +} + +func (_c *MockAPI_GetPostsAfter_Call) Run(run func(channelId string, postId string, page int, perPage int)) *MockAPI_GetPostsAfter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *MockAPI_GetPostsAfter_Call) Return(_a0 *model.PostList, _a1 *model.AppError) *MockAPI_GetPostsAfter_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPostsAfter_Call) RunAndReturn(run func(string, string, int, int) (*model.PostList, *model.AppError)) *MockAPI_GetPostsAfter_Call { + _c.Call.Return(run) + return _c +} + +// GetPostsBefore provides a mock function with given fields: channelId, postId, page, perPage +func (_m *MockAPI) GetPostsBefore(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, postId, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetPostsBefore") + } + + var r0 *model.PostList + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, *model.AppError)); ok { + return rf(channelId, postId, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { + r0 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { + r1 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPostsBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPostsBefore' +type MockAPI_GetPostsBefore_Call struct { + *mock.Call +} + +// GetPostsBefore is a helper method to define mock.On call +// - channelId string +// - postId string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetPostsBefore(channelId interface{}, postId interface{}, page interface{}, perPage interface{}) *MockAPI_GetPostsBefore_Call { + return &MockAPI_GetPostsBefore_Call{Call: _e.mock.On("GetPostsBefore", channelId, postId, page, perPage)} +} + +func (_c *MockAPI_GetPostsBefore_Call) Run(run func(channelId string, postId string, page int, perPage int)) *MockAPI_GetPostsBefore_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *MockAPI_GetPostsBefore_Call) Return(_a0 *model.PostList, _a1 *model.AppError) *MockAPI_GetPostsBefore_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPostsBefore_Call) RunAndReturn(run func(string, string, int, int) (*model.PostList, *model.AppError)) *MockAPI_GetPostsBefore_Call { + _c.Call.Return(run) + return _c +} + +// GetPostsForChannel provides a mock function with given fields: channelId, page, perPage +func (_m *MockAPI) GetPostsForChannel(channelId string, page int, perPage int) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetPostsForChannel") + } + + var r0 *model.PostList + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) (*model.PostList, *model.AppError)); ok { + return rf(channelId, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok { + r0 = rf(channelId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(channelId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPostsForChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPostsForChannel' +type MockAPI_GetPostsForChannel_Call struct { + *mock.Call +} + +// GetPostsForChannel is a helper method to define mock.On call +// - channelId string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetPostsForChannel(channelId interface{}, page interface{}, perPage interface{}) *MockAPI_GetPostsForChannel_Call { + return &MockAPI_GetPostsForChannel_Call{Call: _e.mock.On("GetPostsForChannel", channelId, page, perPage)} +} + +func (_c *MockAPI_GetPostsForChannel_Call) Run(run func(channelId string, page int, perPage int)) *MockAPI_GetPostsForChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetPostsForChannel_Call) Return(_a0 *model.PostList, _a1 *model.AppError) *MockAPI_GetPostsForChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPostsForChannel_Call) RunAndReturn(run func(string, int, int) (*model.PostList, *model.AppError)) *MockAPI_GetPostsForChannel_Call { + _c.Call.Return(run) + return _c +} + +// GetPostsSince provides a mock function with given fields: channelId, time +func (_m *MockAPI) GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, time) + + if len(ret) == 0 { + panic("no return value specified for GetPostsSince") + } + + var r0 *model.PostList + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int64) (*model.PostList, *model.AppError)); ok { + return rf(channelId, time) + } + if rf, ok := ret.Get(0).(func(string, int64) *model.PostList); ok { + r0 = rf(channelId, time) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok { + r1 = rf(channelId, time) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPostsSince_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPostsSince' +type MockAPI_GetPostsSince_Call struct { + *mock.Call +} + +// GetPostsSince is a helper method to define mock.On call +// - channelId string +// - time int64 +func (_e *MockAPI_Expecter) GetPostsSince(channelId interface{}, time interface{}) *MockAPI_GetPostsSince_Call { + return &MockAPI_GetPostsSince_Call{Call: _e.mock.On("GetPostsSince", channelId, time)} +} + +func (_c *MockAPI_GetPostsSince_Call) Run(run func(channelId string, time int64)) *MockAPI_GetPostsSince_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int64)) + }) + return _c +} + +func (_c *MockAPI_GetPostsSince_Call) Return(_a0 *model.PostList, _a1 *model.AppError) *MockAPI_GetPostsSince_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPostsSince_Call) RunAndReturn(run func(string, int64) (*model.PostList, *model.AppError)) *MockAPI_GetPostsSince_Call { + _c.Call.Return(run) + return _c +} + +// GetPreferenceForUser provides a mock function with given fields: userID, category, name +func (_m *MockAPI) GetPreferenceForUser(userID string, category string, name string) (model.Preference, *model.AppError) { + ret := _m.Called(userID, category, name) + + if len(ret) == 0 { + panic("no return value specified for GetPreferenceForUser") + } + + var r0 model.Preference + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) (model.Preference, *model.AppError)); ok { + return rf(userID, category, name) + } + if rf, ok := ret.Get(0).(func(string, string, string) model.Preference); ok { + r0 = rf(userID, category, name) + } else { + r0 = ret.Get(0).(model.Preference) + } + + if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { + r1 = rf(userID, category, name) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPreferenceForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPreferenceForUser' +type MockAPI_GetPreferenceForUser_Call struct { + *mock.Call +} + +// GetPreferenceForUser is a helper method to define mock.On call +// - userID string +// - category string +// - name string +func (_e *MockAPI_Expecter) GetPreferenceForUser(userID interface{}, category interface{}, name interface{}) *MockAPI_GetPreferenceForUser_Call { + return &MockAPI_GetPreferenceForUser_Call{Call: _e.mock.On("GetPreferenceForUser", userID, category, name)} +} + +func (_c *MockAPI_GetPreferenceForUser_Call) Run(run func(userID string, category string, name string)) *MockAPI_GetPreferenceForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_GetPreferenceForUser_Call) Return(_a0 model.Preference, _a1 *model.AppError) *MockAPI_GetPreferenceForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPreferenceForUser_Call) RunAndReturn(run func(string, string, string) (model.Preference, *model.AppError)) *MockAPI_GetPreferenceForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetPreferencesForUser provides a mock function with given fields: userID +func (_m *MockAPI) GetPreferencesForUser(userID string) ([]model.Preference, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetPreferencesForUser") + } + + var r0 []model.Preference + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]model.Preference, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) []model.Preference); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]model.Preference) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPreferencesForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPreferencesForUser' +type MockAPI_GetPreferencesForUser_Call struct { + *mock.Call +} + +// GetPreferencesForUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetPreferencesForUser(userID interface{}) *MockAPI_GetPreferencesForUser_Call { + return &MockAPI_GetPreferencesForUser_Call{Call: _e.mock.On("GetPreferencesForUser", userID)} +} + +func (_c *MockAPI_GetPreferencesForUser_Call) Run(run func(userID string)) *MockAPI_GetPreferencesForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetPreferencesForUser_Call) Return(_a0 []model.Preference, _a1 *model.AppError) *MockAPI_GetPreferencesForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPreferencesForUser_Call) RunAndReturn(run func(string) ([]model.Preference, *model.AppError)) *MockAPI_GetPreferencesForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetProfileImage provides a mock function with given fields: userID +func (_m *MockAPI) GetProfileImage(userID string) ([]byte, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetProfileImage") + } + + var r0 []byte + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetProfileImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProfileImage' +type MockAPI_GetProfileImage_Call struct { + *mock.Call +} + +// GetProfileImage is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetProfileImage(userID interface{}) *MockAPI_GetProfileImage_Call { + return &MockAPI_GetProfileImage_Call{Call: _e.mock.On("GetProfileImage", userID)} +} + +func (_c *MockAPI_GetProfileImage_Call) Run(run func(userID string)) *MockAPI_GetProfileImage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetProfileImage_Call) Return(_a0 []byte, _a1 *model.AppError) *MockAPI_GetProfileImage_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetProfileImage_Call) RunAndReturn(run func(string) ([]byte, *model.AppError)) *MockAPI_GetProfileImage_Call { + _c.Call.Return(run) + return _c +} + +// GetPublicChannelsForTeam provides a mock function with given fields: teamID, page, perPage +func (_m *MockAPI) GetPublicChannelsForTeam(teamID string, page int, perPage int) ([]*model.Channel, *model.AppError) { + ret := _m.Called(teamID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetPublicChannelsForTeam") + } + + var r0 []*model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Channel, *model.AppError)); ok { + return rf(teamID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.Channel); ok { + r0 = rf(teamID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(teamID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetPublicChannelsForTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublicChannelsForTeam' +type MockAPI_GetPublicChannelsForTeam_Call struct { + *mock.Call +} + +// GetPublicChannelsForTeam is a helper method to define mock.On call +// - teamID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetPublicChannelsForTeam(teamID interface{}, page interface{}, perPage interface{}) *MockAPI_GetPublicChannelsForTeam_Call { + return &MockAPI_GetPublicChannelsForTeam_Call{Call: _e.mock.On("GetPublicChannelsForTeam", teamID, page, perPage)} +} + +func (_c *MockAPI_GetPublicChannelsForTeam_Call) Run(run func(teamID string, page int, perPage int)) *MockAPI_GetPublicChannelsForTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetPublicChannelsForTeam_Call) Return(_a0 []*model.Channel, _a1 *model.AppError) *MockAPI_GetPublicChannelsForTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetPublicChannelsForTeam_Call) RunAndReturn(run func(string, int, int) ([]*model.Channel, *model.AppError)) *MockAPI_GetPublicChannelsForTeam_Call { + _c.Call.Return(run) + return _c +} + +// GetReactions provides a mock function with given fields: postId +func (_m *MockAPI) GetReactions(postId string) ([]*model.Reaction, *model.AppError) { + ret := _m.Called(postId) + + if len(ret) == 0 { + panic("no return value specified for GetReactions") + } + + var r0 []*model.Reaction + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]*model.Reaction, *model.AppError)); ok { + return rf(postId) + } + if rf, ok := ret.Get(0).(func(string) []*model.Reaction); ok { + r0 = rf(postId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(postId) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetReactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReactions' +type MockAPI_GetReactions_Call struct { + *mock.Call +} + +// GetReactions is a helper method to define mock.On call +// - postId string +func (_e *MockAPI_Expecter) GetReactions(postId interface{}) *MockAPI_GetReactions_Call { + return &MockAPI_GetReactions_Call{Call: _e.mock.On("GetReactions", postId)} +} + +func (_c *MockAPI_GetReactions_Call) Run(run func(postId string)) *MockAPI_GetReactions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetReactions_Call) Return(_a0 []*model.Reaction, _a1 *model.AppError) *MockAPI_GetReactions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetReactions_Call) RunAndReturn(run func(string) ([]*model.Reaction, *model.AppError)) *MockAPI_GetReactions_Call { + _c.Call.Return(run) + return _c +} + +// GetServerVersion provides a mock function with given fields: +func (_m *MockAPI) GetServerVersion() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetServerVersion") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockAPI_GetServerVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServerVersion' +type MockAPI_GetServerVersion_Call struct { + *mock.Call +} + +// GetServerVersion is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetServerVersion() *MockAPI_GetServerVersion_Call { + return &MockAPI_GetServerVersion_Call{Call: _e.mock.On("GetServerVersion")} +} + +func (_c *MockAPI_GetServerVersion_Call) Run(run func()) *MockAPI_GetServerVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetServerVersion_Call) Return(_a0 string) *MockAPI_GetServerVersion_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetServerVersion_Call) RunAndReturn(run func() string) *MockAPI_GetServerVersion_Call { + _c.Call.Return(run) + return _c +} + +// GetSession provides a mock function with given fields: sessionID +func (_m *MockAPI) GetSession(sessionID string) (*model.Session, *model.AppError) { + ret := _m.Called(sessionID) + + if len(ret) == 0 { + panic("no return value specified for GetSession") + } + + var r0 *model.Session + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Session, *model.AppError)); ok { + return rf(sessionID) + } + if rf, ok := ret.Get(0).(func(string) *model.Session); ok { + r0 = rf(sessionID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Session) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(sessionID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSession' +type MockAPI_GetSession_Call struct { + *mock.Call +} + +// GetSession is a helper method to define mock.On call +// - sessionID string +func (_e *MockAPI_Expecter) GetSession(sessionID interface{}) *MockAPI_GetSession_Call { + return &MockAPI_GetSession_Call{Call: _e.mock.On("GetSession", sessionID)} +} + +func (_c *MockAPI_GetSession_Call) Run(run func(sessionID string)) *MockAPI_GetSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetSession_Call) Return(_a0 *model.Session, _a1 *model.AppError) *MockAPI_GetSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetSession_Call) RunAndReturn(run func(string) (*model.Session, *model.AppError)) *MockAPI_GetSession_Call { + _c.Call.Return(run) + return _c +} + +// GetSystemInstallDate provides a mock function with given fields: +func (_m *MockAPI) GetSystemInstallDate() (int64, *model.AppError) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSystemInstallDate") + } + + var r0 int64 + var r1 *model.AppError + if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + if rf, ok := ret.Get(1).(func() *model.AppError); ok { + r1 = rf() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetSystemInstallDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSystemInstallDate' +type MockAPI_GetSystemInstallDate_Call struct { + *mock.Call +} + +// GetSystemInstallDate is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetSystemInstallDate() *MockAPI_GetSystemInstallDate_Call { + return &MockAPI_GetSystemInstallDate_Call{Call: _e.mock.On("GetSystemInstallDate")} +} + +func (_c *MockAPI_GetSystemInstallDate_Call) Run(run func()) *MockAPI_GetSystemInstallDate_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetSystemInstallDate_Call) Return(_a0 int64, _a1 *model.AppError) *MockAPI_GetSystemInstallDate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetSystemInstallDate_Call) RunAndReturn(run func() (int64, *model.AppError)) *MockAPI_GetSystemInstallDate_Call { + _c.Call.Return(run) + return _c +} + +// GetTeam provides a mock function with given fields: teamID +func (_m *MockAPI) GetTeam(teamID string) (*model.Team, *model.AppError) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for GetTeam") + } + + var r0 *model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Team, *model.AppError)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) *model.Team); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(teamID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeam' +type MockAPI_GetTeam_Call struct { + *mock.Call +} + +// GetTeam is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) GetTeam(teamID interface{}) *MockAPI_GetTeam_Call { + return &MockAPI_GetTeam_Call{Call: _e.mock.On("GetTeam", teamID)} +} + +func (_c *MockAPI_GetTeam_Call) Run(run func(teamID string)) *MockAPI_GetTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeam_Call) Return(_a0 *model.Team, _a1 *model.AppError) *MockAPI_GetTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeam_Call) RunAndReturn(run func(string) (*model.Team, *model.AppError)) *MockAPI_GetTeam_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamByName provides a mock function with given fields: name +func (_m *MockAPI) GetTeamByName(name string) (*model.Team, *model.AppError) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for GetTeamByName") + } + + var r0 *model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Team, *model.AppError)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) *model.Team); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(name) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamByName' +type MockAPI_GetTeamByName_Call struct { + *mock.Call +} + +// GetTeamByName is a helper method to define mock.On call +// - name string +func (_e *MockAPI_Expecter) GetTeamByName(name interface{}) *MockAPI_GetTeamByName_Call { + return &MockAPI_GetTeamByName_Call{Call: _e.mock.On("GetTeamByName", name)} +} + +func (_c *MockAPI_GetTeamByName_Call) Run(run func(name string)) *MockAPI_GetTeamByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamByName_Call) Return(_a0 *model.Team, _a1 *model.AppError) *MockAPI_GetTeamByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamByName_Call) RunAndReturn(run func(string) (*model.Team, *model.AppError)) *MockAPI_GetTeamByName_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamIcon provides a mock function with given fields: teamID +func (_m *MockAPI) GetTeamIcon(teamID string) ([]byte, *model.AppError) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for GetTeamIcon") + } + + var r0 []byte + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(teamID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamIcon' +type MockAPI_GetTeamIcon_Call struct { + *mock.Call +} + +// GetTeamIcon is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) GetTeamIcon(teamID interface{}) *MockAPI_GetTeamIcon_Call { + return &MockAPI_GetTeamIcon_Call{Call: _e.mock.On("GetTeamIcon", teamID)} +} + +func (_c *MockAPI_GetTeamIcon_Call) Run(run func(teamID string)) *MockAPI_GetTeamIcon_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamIcon_Call) Return(_a0 []byte, _a1 *model.AppError) *MockAPI_GetTeamIcon_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamIcon_Call) RunAndReturn(run func(string) ([]byte, *model.AppError)) *MockAPI_GetTeamIcon_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamMember provides a mock function with given fields: teamID, userID +func (_m *MockAPI) GetTeamMember(teamID string, userID string) (*model.TeamMember, *model.AppError) { + ret := _m.Called(teamID, userID) + + if len(ret) == 0 { + panic("no return value specified for GetTeamMember") + } + + var r0 *model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.TeamMember, *model.AppError)); ok { + return rf(teamID, userID) + } + if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok { + r0 = rf(teamID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(teamID, userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamMember' +type MockAPI_GetTeamMember_Call struct { + *mock.Call +} + +// GetTeamMember is a helper method to define mock.On call +// - teamID string +// - userID string +func (_e *MockAPI_Expecter) GetTeamMember(teamID interface{}, userID interface{}) *MockAPI_GetTeamMember_Call { + return &MockAPI_GetTeamMember_Call{Call: _e.mock.On("GetTeamMember", teamID, userID)} +} + +func (_c *MockAPI_GetTeamMember_Call) Run(run func(teamID string, userID string)) *MockAPI_GetTeamMember_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamMember_Call) Return(_a0 *model.TeamMember, _a1 *model.AppError) *MockAPI_GetTeamMember_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamMember_Call) RunAndReturn(run func(string, string) (*model.TeamMember, *model.AppError)) *MockAPI_GetTeamMember_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamMembers provides a mock function with given fields: teamID, page, perPage +func (_m *MockAPI) GetTeamMembers(teamID string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { + ret := _m.Called(teamID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetTeamMembers") + } + + var r0 []*model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, *model.AppError)); ok { + return rf(teamID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok { + r0 = rf(teamID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(teamID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamMembers' +type MockAPI_GetTeamMembers_Call struct { + *mock.Call +} + +// GetTeamMembers is a helper method to define mock.On call +// - teamID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetTeamMembers(teamID interface{}, page interface{}, perPage interface{}) *MockAPI_GetTeamMembers_Call { + return &MockAPI_GetTeamMembers_Call{Call: _e.mock.On("GetTeamMembers", teamID, page, perPage)} +} + +func (_c *MockAPI_GetTeamMembers_Call) Run(run func(teamID string, page int, perPage int)) *MockAPI_GetTeamMembers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetTeamMembers_Call) Return(_a0 []*model.TeamMember, _a1 *model.AppError) *MockAPI_GetTeamMembers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamMembers_Call) RunAndReturn(run func(string, int, int) ([]*model.TeamMember, *model.AppError)) *MockAPI_GetTeamMembers_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamMembersForUser provides a mock function with given fields: userID, page, perPage +func (_m *MockAPI) GetTeamMembersForUser(userID string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { + ret := _m.Called(userID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetTeamMembersForUser") + } + + var r0 []*model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, *model.AppError)); ok { + return rf(userID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok { + r0 = rf(userID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(userID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamMembersForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamMembersForUser' +type MockAPI_GetTeamMembersForUser_Call struct { + *mock.Call +} + +// GetTeamMembersForUser is a helper method to define mock.On call +// - userID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetTeamMembersForUser(userID interface{}, page interface{}, perPage interface{}) *MockAPI_GetTeamMembersForUser_Call { + return &MockAPI_GetTeamMembersForUser_Call{Call: _e.mock.On("GetTeamMembersForUser", userID, page, perPage)} +} + +func (_c *MockAPI_GetTeamMembersForUser_Call) Run(run func(userID string, page int, perPage int)) *MockAPI_GetTeamMembersForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetTeamMembersForUser_Call) Return(_a0 []*model.TeamMember, _a1 *model.AppError) *MockAPI_GetTeamMembersForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamMembersForUser_Call) RunAndReturn(run func(string, int, int) ([]*model.TeamMember, *model.AppError)) *MockAPI_GetTeamMembersForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamStats provides a mock function with given fields: teamID +func (_m *MockAPI) GetTeamStats(teamID string) (*model.TeamStats, *model.AppError) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for GetTeamStats") + } + + var r0 *model.TeamStats + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.TeamStats, *model.AppError)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) *model.TeamStats); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.TeamStats) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(teamID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamStats' +type MockAPI_GetTeamStats_Call struct { + *mock.Call +} + +// GetTeamStats is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) GetTeamStats(teamID interface{}) *MockAPI_GetTeamStats_Call { + return &MockAPI_GetTeamStats_Call{Call: _e.mock.On("GetTeamStats", teamID)} +} + +func (_c *MockAPI_GetTeamStats_Call) Run(run func(teamID string)) *MockAPI_GetTeamStats_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamStats_Call) Return(_a0 *model.TeamStats, _a1 *model.AppError) *MockAPI_GetTeamStats_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamStats_Call) RunAndReturn(run func(string) (*model.TeamStats, *model.AppError)) *MockAPI_GetTeamStats_Call { + _c.Call.Return(run) + return _c +} + +// GetTeams provides a mock function with given fields: +func (_m *MockAPI) GetTeams() ([]*model.Team, *model.AppError) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTeams") + } + + var r0 []*model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func() ([]*model.Team, *model.AppError)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []*model.Team); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Team) + } + } + + if rf, ok := ret.Get(1).(func() *model.AppError); ok { + r1 = rf() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeams' +type MockAPI_GetTeams_Call struct { + *mock.Call +} + +// GetTeams is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetTeams() *MockAPI_GetTeams_Call { + return &MockAPI_GetTeams_Call{Call: _e.mock.On("GetTeams")} +} + +func (_c *MockAPI_GetTeams_Call) Run(run func()) *MockAPI_GetTeams_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetTeams_Call) Return(_a0 []*model.Team, _a1 *model.AppError) *MockAPI_GetTeams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeams_Call) RunAndReturn(run func() ([]*model.Team, *model.AppError)) *MockAPI_GetTeams_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamsForUser provides a mock function with given fields: userID +func (_m *MockAPI) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetTeamsForUser") + } + + var r0 []*model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]*model.Team, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) []*model.Team); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamsForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamsForUser' +type MockAPI_GetTeamsForUser_Call struct { + *mock.Call +} + +// GetTeamsForUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetTeamsForUser(userID interface{}) *MockAPI_GetTeamsForUser_Call { + return &MockAPI_GetTeamsForUser_Call{Call: _e.mock.On("GetTeamsForUser", userID)} +} + +func (_c *MockAPI_GetTeamsForUser_Call) Run(run func(userID string)) *MockAPI_GetTeamsForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamsForUser_Call) Return(_a0 []*model.Team, _a1 *model.AppError) *MockAPI_GetTeamsForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamsForUser_Call) RunAndReturn(run func(string) ([]*model.Team, *model.AppError)) *MockAPI_GetTeamsForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetTeamsUnreadForUser provides a mock function with given fields: userID +func (_m *MockAPI) GetTeamsUnreadForUser(userID string) ([]*model.TeamUnread, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetTeamsUnreadForUser") + } + + var r0 []*model.TeamUnread + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]*model.TeamUnread, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) []*model.TeamUnread); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.TeamUnread) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetTeamsUnreadForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamsUnreadForUser' +type MockAPI_GetTeamsUnreadForUser_Call struct { + *mock.Call +} + +// GetTeamsUnreadForUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetTeamsUnreadForUser(userID interface{}) *MockAPI_GetTeamsUnreadForUser_Call { + return &MockAPI_GetTeamsUnreadForUser_Call{Call: _e.mock.On("GetTeamsUnreadForUser", userID)} +} + +func (_c *MockAPI_GetTeamsUnreadForUser_Call) Run(run func(userID string)) *MockAPI_GetTeamsUnreadForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetTeamsUnreadForUser_Call) Return(_a0 []*model.TeamUnread, _a1 *model.AppError) *MockAPI_GetTeamsUnreadForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetTeamsUnreadForUser_Call) RunAndReturn(run func(string) ([]*model.TeamUnread, *model.AppError)) *MockAPI_GetTeamsUnreadForUser_Call { + _c.Call.Return(run) + return _c +} + +// GetTelemetryId provides a mock function with given fields: +func (_m *MockAPI) GetTelemetryId() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTelemetryId") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockAPI_GetTelemetryId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTelemetryId' +type MockAPI_GetTelemetryId_Call struct { + *mock.Call +} + +// GetTelemetryId is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetTelemetryId() *MockAPI_GetTelemetryId_Call { + return &MockAPI_GetTelemetryId_Call{Call: _e.mock.On("GetTelemetryId")} +} + +func (_c *MockAPI_GetTelemetryId_Call) Run(run func()) *MockAPI_GetTelemetryId_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetTelemetryId_Call) Return(_a0 string) *MockAPI_GetTelemetryId_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetTelemetryId_Call) RunAndReturn(run func() string) *MockAPI_GetTelemetryId_Call { + _c.Call.Return(run) + return _c +} + +// GetUnsanitizedConfig provides a mock function with given fields: +func (_m *MockAPI) GetUnsanitizedConfig() *model.Config { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetUnsanitizedConfig") + } + + var r0 *model.Config + if rf, ok := ret.Get(0).(func() *model.Config); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Config) + } + } + + return r0 +} + +// MockAPI_GetUnsanitizedConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnsanitizedConfig' +type MockAPI_GetUnsanitizedConfig_Call struct { + *mock.Call +} + +// GetUnsanitizedConfig is a helper method to define mock.On call +func (_e *MockAPI_Expecter) GetUnsanitizedConfig() *MockAPI_GetUnsanitizedConfig_Call { + return &MockAPI_GetUnsanitizedConfig_Call{Call: _e.mock.On("GetUnsanitizedConfig")} +} + +func (_c *MockAPI_GetUnsanitizedConfig_Call) Run(run func()) *MockAPI_GetUnsanitizedConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_GetUnsanitizedConfig_Call) Return(_a0 *model.Config) *MockAPI_GetUnsanitizedConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_GetUnsanitizedConfig_Call) RunAndReturn(run func() *model.Config) *MockAPI_GetUnsanitizedConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetUploadSession provides a mock function with given fields: uploadID +func (_m *MockAPI) GetUploadSession(uploadID string) (*model.UploadSession, error) { + ret := _m.Called(uploadID) + + if len(ret) == 0 { + panic("no return value specified for GetUploadSession") + } + + var r0 *model.UploadSession + var r1 error + if rf, ok := ret.Get(0).(func(string) (*model.UploadSession, error)); ok { + return rf(uploadID) + } + if rf, ok := ret.Get(0).(func(string) *model.UploadSession); ok { + r0 = rf(uploadID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.UploadSession) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(uploadID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_GetUploadSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUploadSession' +type MockAPI_GetUploadSession_Call struct { + *mock.Call +} + +// GetUploadSession is a helper method to define mock.On call +// - uploadID string +func (_e *MockAPI_Expecter) GetUploadSession(uploadID interface{}) *MockAPI_GetUploadSession_Call { + return &MockAPI_GetUploadSession_Call{Call: _e.mock.On("GetUploadSession", uploadID)} +} + +func (_c *MockAPI_GetUploadSession_Call) Run(run func(uploadID string)) *MockAPI_GetUploadSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetUploadSession_Call) Return(_a0 *model.UploadSession, _a1 error) *MockAPI_GetUploadSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUploadSession_Call) RunAndReturn(run func(string) (*model.UploadSession, error)) *MockAPI_GetUploadSession_Call { + _c.Call.Return(run) + return _c +} + +// GetUser provides a mock function with given fields: userID +func (_m *MockAPI) GetUser(userID string) (*model.User, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetUser") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) *model.User); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser' +type MockAPI_GetUser_Call struct { + *mock.Call +} + +// GetUser is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetUser(userID interface{}) *MockAPI_GetUser_Call { + return &MockAPI_GetUser_Call{Call: _e.mock.On("GetUser", userID)} +} + +func (_c *MockAPI_GetUser_Call) Run(run func(userID string)) *MockAPI_GetUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetUser_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_GetUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUser_Call) RunAndReturn(run func(string) (*model.User, *model.AppError)) *MockAPI_GetUser_Call { + _c.Call.Return(run) + return _c +} + +// GetUserByEmail provides a mock function with given fields: email +func (_m *MockAPI) GetUserByEmail(email string) (*model.User, *model.AppError) { + ret := _m.Called(email) + + if len(ret) == 0 { + panic("no return value specified for GetUserByEmail") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { + return rf(email) + } + if rf, ok := ret.Get(0).(func(string) *model.User); ok { + r0 = rf(email) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(email) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUserByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByEmail' +type MockAPI_GetUserByEmail_Call struct { + *mock.Call +} + +// GetUserByEmail is a helper method to define mock.On call +// - email string +func (_e *MockAPI_Expecter) GetUserByEmail(email interface{}) *MockAPI_GetUserByEmail_Call { + return &MockAPI_GetUserByEmail_Call{Call: _e.mock.On("GetUserByEmail", email)} +} + +func (_c *MockAPI_GetUserByEmail_Call) Run(run func(email string)) *MockAPI_GetUserByEmail_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetUserByEmail_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_GetUserByEmail_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUserByEmail_Call) RunAndReturn(run func(string) (*model.User, *model.AppError)) *MockAPI_GetUserByEmail_Call { + _c.Call.Return(run) + return _c +} + +// GetUserByUsername provides a mock function with given fields: name +func (_m *MockAPI) GetUserByUsername(name string) (*model.User, *model.AppError) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for GetUserByUsername") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) *model.User); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(name) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUserByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByUsername' +type MockAPI_GetUserByUsername_Call struct { + *mock.Call +} + +// GetUserByUsername is a helper method to define mock.On call +// - name string +func (_e *MockAPI_Expecter) GetUserByUsername(name interface{}) *MockAPI_GetUserByUsername_Call { + return &MockAPI_GetUserByUsername_Call{Call: _e.mock.On("GetUserByUsername", name)} +} + +func (_c *MockAPI_GetUserByUsername_Call) Run(run func(name string)) *MockAPI_GetUserByUsername_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetUserByUsername_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_GetUserByUsername_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUserByUsername_Call) RunAndReturn(run func(string) (*model.User, *model.AppError)) *MockAPI_GetUserByUsername_Call { + _c.Call.Return(run) + return _c +} + +// GetUserStatus provides a mock function with given fields: userID +func (_m *MockAPI) GetUserStatus(userID string) (*model.Status, *model.AppError) { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for GetUserStatus") + } + + var r0 *model.Status + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) (*model.Status, *model.AppError)); ok { + return rf(userID) + } + if rf, ok := ret.Get(0).(func(string) *model.Status); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Status) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(userID) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUserStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserStatus' +type MockAPI_GetUserStatus_Call struct { + *mock.Call +} + +// GetUserStatus is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) GetUserStatus(userID interface{}) *MockAPI_GetUserStatus_Call { + return &MockAPI_GetUserStatus_Call{Call: _e.mock.On("GetUserStatus", userID)} +} + +func (_c *MockAPI_GetUserStatus_Call) Run(run func(userID string)) *MockAPI_GetUserStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_GetUserStatus_Call) Return(_a0 *model.Status, _a1 *model.AppError) *MockAPI_GetUserStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUserStatus_Call) RunAndReturn(run func(string) (*model.Status, *model.AppError)) *MockAPI_GetUserStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetUserStatusesByIds provides a mock function with given fields: userIds +func (_m *MockAPI) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError) { + ret := _m.Called(userIds) + + if len(ret) == 0 { + panic("no return value specified for GetUserStatusesByIds") + } + + var r0 []*model.Status + var r1 *model.AppError + if rf, ok := ret.Get(0).(func([]string) ([]*model.Status, *model.AppError)); ok { + return rf(userIds) + } + if rf, ok := ret.Get(0).(func([]string) []*model.Status); ok { + r0 = rf(userIds) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Status) + } + } + + if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { + r1 = rf(userIds) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUserStatusesByIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserStatusesByIds' +type MockAPI_GetUserStatusesByIds_Call struct { + *mock.Call +} + +// GetUserStatusesByIds is a helper method to define mock.On call +// - userIds []string +func (_e *MockAPI_Expecter) GetUserStatusesByIds(userIds interface{}) *MockAPI_GetUserStatusesByIds_Call { + return &MockAPI_GetUserStatusesByIds_Call{Call: _e.mock.On("GetUserStatusesByIds", userIds)} +} + +func (_c *MockAPI_GetUserStatusesByIds_Call) Run(run func(userIds []string)) *MockAPI_GetUserStatusesByIds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetUserStatusesByIds_Call) Return(_a0 []*model.Status, _a1 *model.AppError) *MockAPI_GetUserStatusesByIds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUserStatusesByIds_Call) RunAndReturn(run func([]string) ([]*model.Status, *model.AppError)) *MockAPI_GetUserStatusesByIds_Call { + _c.Call.Return(run) + return _c +} + +// GetUsers provides a mock function with given fields: options +func (_m *MockAPI) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError) { + ret := _m.Called(options) + + if len(ret) == 0 { + panic("no return value specified for GetUsers") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.UserGetOptions) ([]*model.User, *model.AppError)); ok { + return rf(options) + } + if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { + r0 = rf(options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func(*model.UserGetOptions) *model.AppError); ok { + r1 = rf(options) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsers' +type MockAPI_GetUsers_Call struct { + *mock.Call +} + +// GetUsers is a helper method to define mock.On call +// - options *model.UserGetOptions +func (_e *MockAPI_Expecter) GetUsers(options interface{}) *MockAPI_GetUsers_Call { + return &MockAPI_GetUsers_Call{Call: _e.mock.On("GetUsers", options)} +} + +func (_c *MockAPI_GetUsers_Call) Run(run func(options *model.UserGetOptions)) *MockAPI_GetUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.UserGetOptions)) + }) + return _c +} + +func (_c *MockAPI_GetUsers_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUsers_Call) RunAndReturn(run func(*model.UserGetOptions) ([]*model.User, *model.AppError)) *MockAPI_GetUsers_Call { + _c.Call.Return(run) + return _c +} + +// GetUsersByIds provides a mock function with given fields: userIDs +func (_m *MockAPI) GetUsersByIds(userIDs []string) ([]*model.User, *model.AppError) { + ret := _m.Called(userIDs) + + if len(ret) == 0 { + panic("no return value specified for GetUsersByIds") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func([]string) ([]*model.User, *model.AppError)); ok { + return rf(userIDs) + } + if rf, ok := ret.Get(0).(func([]string) []*model.User); ok { + r0 = rf(userIDs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { + r1 = rf(userIDs) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUsersByIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersByIds' +type MockAPI_GetUsersByIds_Call struct { + *mock.Call +} + +// GetUsersByIds is a helper method to define mock.On call +// - userIDs []string +func (_e *MockAPI_Expecter) GetUsersByIds(userIDs interface{}) *MockAPI_GetUsersByIds_Call { + return &MockAPI_GetUsersByIds_Call{Call: _e.mock.On("GetUsersByIds", userIDs)} +} + +func (_c *MockAPI_GetUsersByIds_Call) Run(run func(userIDs []string)) *MockAPI_GetUsersByIds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetUsersByIds_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetUsersByIds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUsersByIds_Call) RunAndReturn(run func([]string) ([]*model.User, *model.AppError)) *MockAPI_GetUsersByIds_Call { + _c.Call.Return(run) + return _c +} + +// GetUsersByUsernames provides a mock function with given fields: usernames +func (_m *MockAPI) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) { + ret := _m.Called(usernames) + + if len(ret) == 0 { + panic("no return value specified for GetUsersByUsernames") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func([]string) ([]*model.User, *model.AppError)); ok { + return rf(usernames) + } + if rf, ok := ret.Get(0).(func([]string) []*model.User); ok { + r0 = rf(usernames) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { + r1 = rf(usernames) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUsersByUsernames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersByUsernames' +type MockAPI_GetUsersByUsernames_Call struct { + *mock.Call +} + +// GetUsersByUsernames is a helper method to define mock.On call +// - usernames []string +func (_e *MockAPI_Expecter) GetUsersByUsernames(usernames interface{}) *MockAPI_GetUsersByUsernames_Call { + return &MockAPI_GetUsersByUsernames_Call{Call: _e.mock.On("GetUsersByUsernames", usernames)} +} + +func (_c *MockAPI_GetUsersByUsernames_Call) Run(run func(usernames []string)) *MockAPI_GetUsersByUsernames_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string)) + }) + return _c +} + +func (_c *MockAPI_GetUsersByUsernames_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetUsersByUsernames_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUsersByUsernames_Call) RunAndReturn(run func([]string) ([]*model.User, *model.AppError)) *MockAPI_GetUsersByUsernames_Call { + _c.Call.Return(run) + return _c +} + +// GetUsersInChannel provides a mock function with given fields: channelID, sortBy, page, perPage +func (_m *MockAPI) GetUsersInChannel(channelID string, sortBy string, page int, perPage int) ([]*model.User, *model.AppError) { + ret := _m.Called(channelID, sortBy, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetUsersInChannel") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.User, *model.AppError)); ok { + return rf(channelID, sortBy, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.User); ok { + r0 = rf(channelID, sortBy, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { + r1 = rf(channelID, sortBy, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUsersInChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersInChannel' +type MockAPI_GetUsersInChannel_Call struct { + *mock.Call +} + +// GetUsersInChannel is a helper method to define mock.On call +// - channelID string +// - sortBy string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetUsersInChannel(channelID interface{}, sortBy interface{}, page interface{}, perPage interface{}) *MockAPI_GetUsersInChannel_Call { + return &MockAPI_GetUsersInChannel_Call{Call: _e.mock.On("GetUsersInChannel", channelID, sortBy, page, perPage)} +} + +func (_c *MockAPI_GetUsersInChannel_Call) Run(run func(channelID string, sortBy string, page int, perPage int)) *MockAPI_GetUsersInChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *MockAPI_GetUsersInChannel_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetUsersInChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUsersInChannel_Call) RunAndReturn(run func(string, string, int, int) ([]*model.User, *model.AppError)) *MockAPI_GetUsersInChannel_Call { + _c.Call.Return(run) + return _c +} + +// GetUsersInTeam provides a mock function with given fields: teamID, page, perPage +func (_m *MockAPI) GetUsersInTeam(teamID string, page int, perPage int) ([]*model.User, *model.AppError) { + ret := _m.Called(teamID, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for GetUsersInTeam") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.User, *model.AppError)); ok { + return rf(teamID, page, perPage) + } + if rf, ok := ret.Get(0).(func(string, int, int) []*model.User); ok { + r0 = rf(teamID, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(teamID, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_GetUsersInTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersInTeam' +type MockAPI_GetUsersInTeam_Call struct { + *mock.Call +} + +// GetUsersInTeam is a helper method to define mock.On call +// - teamID string +// - page int +// - perPage int +func (_e *MockAPI_Expecter) GetUsersInTeam(teamID interface{}, page interface{}, perPage interface{}) *MockAPI_GetUsersInTeam_Call { + return &MockAPI_GetUsersInTeam_Call{Call: _e.mock.On("GetUsersInTeam", teamID, page, perPage)} +} + +func (_c *MockAPI_GetUsersInTeam_Call) Run(run func(teamID string, page int, perPage int)) *MockAPI_GetUsersInTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *MockAPI_GetUsersInTeam_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_GetUsersInTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_GetUsersInTeam_Call) RunAndReturn(run func(string, int, int) ([]*model.User, *model.AppError)) *MockAPI_GetUsersInTeam_Call { + _c.Call.Return(run) + return _c +} + +// HasPermissionTo provides a mock function with given fields: userID, permission +func (_m *MockAPI) HasPermissionTo(userID string, permission *model.Permission) bool { + ret := _m.Called(userID, permission) + + if len(ret) == 0 { + panic("no return value specified for HasPermissionTo") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(string, *model.Permission) bool); ok { + r0 = rf(userID, permission) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAPI_HasPermissionTo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPermissionTo' +type MockAPI_HasPermissionTo_Call struct { + *mock.Call +} + +// HasPermissionTo is a helper method to define mock.On call +// - userID string +// - permission *model.Permission +func (_e *MockAPI_Expecter) HasPermissionTo(userID interface{}, permission interface{}) *MockAPI_HasPermissionTo_Call { + return &MockAPI_HasPermissionTo_Call{Call: _e.mock.On("HasPermissionTo", userID, permission)} +} + +func (_c *MockAPI_HasPermissionTo_Call) Run(run func(userID string, permission *model.Permission)) *MockAPI_HasPermissionTo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.Permission)) + }) + return _c +} + +func (_c *MockAPI_HasPermissionTo_Call) Return(_a0 bool) *MockAPI_HasPermissionTo_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_HasPermissionTo_Call) RunAndReturn(run func(string, *model.Permission) bool) *MockAPI_HasPermissionTo_Call { + _c.Call.Return(run) + return _c +} + +// HasPermissionToChannel provides a mock function with given fields: userID, channelId, permission +func (_m *MockAPI) HasPermissionToChannel(userID string, channelId string, permission *model.Permission) bool { + ret := _m.Called(userID, channelId, permission) + + if len(ret) == 0 { + panic("no return value specified for HasPermissionToChannel") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { + r0 = rf(userID, channelId, permission) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAPI_HasPermissionToChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPermissionToChannel' +type MockAPI_HasPermissionToChannel_Call struct { + *mock.Call +} + +// HasPermissionToChannel is a helper method to define mock.On call +// - userID string +// - channelId string +// - permission *model.Permission +func (_e *MockAPI_Expecter) HasPermissionToChannel(userID interface{}, channelId interface{}, permission interface{}) *MockAPI_HasPermissionToChannel_Call { + return &MockAPI_HasPermissionToChannel_Call{Call: _e.mock.On("HasPermissionToChannel", userID, channelId, permission)} +} + +func (_c *MockAPI_HasPermissionToChannel_Call) Run(run func(userID string, channelId string, permission *model.Permission)) *MockAPI_HasPermissionToChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(*model.Permission)) + }) + return _c +} + +func (_c *MockAPI_HasPermissionToChannel_Call) Return(_a0 bool) *MockAPI_HasPermissionToChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_HasPermissionToChannel_Call) RunAndReturn(run func(string, string, *model.Permission) bool) *MockAPI_HasPermissionToChannel_Call { + _c.Call.Return(run) + return _c +} + +// HasPermissionToTeam provides a mock function with given fields: userID, teamID, permission +func (_m *MockAPI) HasPermissionToTeam(userID string, teamID string, permission *model.Permission) bool { + ret := _m.Called(userID, teamID, permission) + + if len(ret) == 0 { + panic("no return value specified for HasPermissionToTeam") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { + r0 = rf(userID, teamID, permission) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAPI_HasPermissionToTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPermissionToTeam' +type MockAPI_HasPermissionToTeam_Call struct { + *mock.Call +} + +// HasPermissionToTeam is a helper method to define mock.On call +// - userID string +// - teamID string +// - permission *model.Permission +func (_e *MockAPI_Expecter) HasPermissionToTeam(userID interface{}, teamID interface{}, permission interface{}) *MockAPI_HasPermissionToTeam_Call { + return &MockAPI_HasPermissionToTeam_Call{Call: _e.mock.On("HasPermissionToTeam", userID, teamID, permission)} +} + +func (_c *MockAPI_HasPermissionToTeam_Call) Run(run func(userID string, teamID string, permission *model.Permission)) *MockAPI_HasPermissionToTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(*model.Permission)) + }) + return _c +} + +func (_c *MockAPI_HasPermissionToTeam_Call) Return(_a0 bool) *MockAPI_HasPermissionToTeam_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_HasPermissionToTeam_Call) RunAndReturn(run func(string, string, *model.Permission) bool) *MockAPI_HasPermissionToTeam_Call { + _c.Call.Return(run) + return _c +} + +// InstallPlugin provides a mock function with given fields: file, replace +func (_m *MockAPI) InstallPlugin(file io.Reader, replace bool) (*model.Manifest, *model.AppError) { + ret := _m.Called(file, replace) + + if len(ret) == 0 { + panic("no return value specified for InstallPlugin") + } + + var r0 *model.Manifest + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(io.Reader, bool) (*model.Manifest, *model.AppError)); ok { + return rf(file, replace) + } + if rf, ok := ret.Get(0).(func(io.Reader, bool) *model.Manifest); ok { + r0 = rf(file, replace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Manifest) + } + } + + if rf, ok := ret.Get(1).(func(io.Reader, bool) *model.AppError); ok { + r1 = rf(file, replace) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_InstallPlugin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallPlugin' +type MockAPI_InstallPlugin_Call struct { + *mock.Call +} + +// InstallPlugin is a helper method to define mock.On call +// - file io.Reader +// - replace bool +func (_e *MockAPI_Expecter) InstallPlugin(file interface{}, replace interface{}) *MockAPI_InstallPlugin_Call { + return &MockAPI_InstallPlugin_Call{Call: _e.mock.On("InstallPlugin", file, replace)} +} + +func (_c *MockAPI_InstallPlugin_Call) Run(run func(file io.Reader, replace bool)) *MockAPI_InstallPlugin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(io.Reader), args[1].(bool)) + }) + return _c +} + +func (_c *MockAPI_InstallPlugin_Call) Return(_a0 *model.Manifest, _a1 *model.AppError) *MockAPI_InstallPlugin_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_InstallPlugin_Call) RunAndReturn(run func(io.Reader, bool) (*model.Manifest, *model.AppError)) *MockAPI_InstallPlugin_Call { + _c.Call.Return(run) + return _c +} + +// InviteRemoteToChannel provides a mock function with given fields: channelID, remoteID, userID, shareIfNotShared +func (_m *MockAPI) InviteRemoteToChannel(channelID string, remoteID string, userID string, shareIfNotShared bool) error { + ret := _m.Called(channelID, remoteID, userID, shareIfNotShared) + + if len(ret) == 0 { + panic("no return value specified for InviteRemoteToChannel") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, string, bool) error); ok { + r0 = rf(channelID, remoteID, userID, shareIfNotShared) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_InviteRemoteToChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InviteRemoteToChannel' +type MockAPI_InviteRemoteToChannel_Call struct { + *mock.Call +} + +// InviteRemoteToChannel is a helper method to define mock.On call +// - channelID string +// - remoteID string +// - userID string +// - shareIfNotShared bool +func (_e *MockAPI_Expecter) InviteRemoteToChannel(channelID interface{}, remoteID interface{}, userID interface{}, shareIfNotShared interface{}) *MockAPI_InviteRemoteToChannel_Call { + return &MockAPI_InviteRemoteToChannel_Call{Call: _e.mock.On("InviteRemoteToChannel", channelID, remoteID, userID, shareIfNotShared)} +} + +func (_c *MockAPI_InviteRemoteToChannel_Call) Run(run func(channelID string, remoteID string, userID string, shareIfNotShared bool)) *MockAPI_InviteRemoteToChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string), args[3].(bool)) + }) + return _c +} + +func (_c *MockAPI_InviteRemoteToChannel_Call) Return(_a0 error) *MockAPI_InviteRemoteToChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_InviteRemoteToChannel_Call) RunAndReturn(run func(string, string, string, bool) error) *MockAPI_InviteRemoteToChannel_Call { + _c.Call.Return(run) + return _c +} + +// IsEnterpriseReady provides a mock function with given fields: +func (_m *MockAPI) IsEnterpriseReady() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsEnterpriseReady") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAPI_IsEnterpriseReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsEnterpriseReady' +type MockAPI_IsEnterpriseReady_Call struct { + *mock.Call +} + +// IsEnterpriseReady is a helper method to define mock.On call +func (_e *MockAPI_Expecter) IsEnterpriseReady() *MockAPI_IsEnterpriseReady_Call { + return &MockAPI_IsEnterpriseReady_Call{Call: _e.mock.On("IsEnterpriseReady")} +} + +func (_c *MockAPI_IsEnterpriseReady_Call) Run(run func()) *MockAPI_IsEnterpriseReady_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_IsEnterpriseReady_Call) Return(_a0 bool) *MockAPI_IsEnterpriseReady_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_IsEnterpriseReady_Call) RunAndReturn(run func() bool) *MockAPI_IsEnterpriseReady_Call { + _c.Call.Return(run) + return _c +} + +// KVCompareAndDelete provides a mock function with given fields: key, oldValue +func (_m *MockAPI) KVCompareAndDelete(key string, oldValue []byte) (bool, *model.AppError) { + ret := _m.Called(key, oldValue) + + if len(ret) == 0 { + panic("no return value specified for KVCompareAndDelete") + } + + var r0 bool + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte) (bool, *model.AppError)); ok { + return rf(key, oldValue) + } + if rf, ok := ret.Get(0).(func(string, []byte) bool); ok { + r0 = rf(key, oldValue) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(string, []byte) *model.AppError); ok { + r1 = rf(key, oldValue) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_KVCompareAndDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVCompareAndDelete' +type MockAPI_KVCompareAndDelete_Call struct { + *mock.Call +} + +// KVCompareAndDelete is a helper method to define mock.On call +// - key string +// - oldValue []byte +func (_e *MockAPI_Expecter) KVCompareAndDelete(key interface{}, oldValue interface{}) *MockAPI_KVCompareAndDelete_Call { + return &MockAPI_KVCompareAndDelete_Call{Call: _e.mock.On("KVCompareAndDelete", key, oldValue)} +} + +func (_c *MockAPI_KVCompareAndDelete_Call) Run(run func(key string, oldValue []byte)) *MockAPI_KVCompareAndDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte)) + }) + return _c +} + +func (_c *MockAPI_KVCompareAndDelete_Call) Return(_a0 bool, _a1 *model.AppError) *MockAPI_KVCompareAndDelete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_KVCompareAndDelete_Call) RunAndReturn(run func(string, []byte) (bool, *model.AppError)) *MockAPI_KVCompareAndDelete_Call { + _c.Call.Return(run) + return _c +} + +// KVCompareAndSet provides a mock function with given fields: key, oldValue, newValue +func (_m *MockAPI) KVCompareAndSet(key string, oldValue []byte, newValue []byte) (bool, *model.AppError) { + ret := _m.Called(key, oldValue, newValue) + + if len(ret) == 0 { + panic("no return value specified for KVCompareAndSet") + } + + var r0 bool + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte, []byte) (bool, *model.AppError)); ok { + return rf(key, oldValue, newValue) + } + if rf, ok := ret.Get(0).(func(string, []byte, []byte) bool); ok { + r0 = rf(key, oldValue, newValue) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(string, []byte, []byte) *model.AppError); ok { + r1 = rf(key, oldValue, newValue) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_KVCompareAndSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVCompareAndSet' +type MockAPI_KVCompareAndSet_Call struct { + *mock.Call +} + +// KVCompareAndSet is a helper method to define mock.On call +// - key string +// - oldValue []byte +// - newValue []byte +func (_e *MockAPI_Expecter) KVCompareAndSet(key interface{}, oldValue interface{}, newValue interface{}) *MockAPI_KVCompareAndSet_Call { + return &MockAPI_KVCompareAndSet_Call{Call: _e.mock.On("KVCompareAndSet", key, oldValue, newValue)} +} + +func (_c *MockAPI_KVCompareAndSet_Call) Run(run func(key string, oldValue []byte, newValue []byte)) *MockAPI_KVCompareAndSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte), args[2].([]byte)) + }) + return _c +} + +func (_c *MockAPI_KVCompareAndSet_Call) Return(_a0 bool, _a1 *model.AppError) *MockAPI_KVCompareAndSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_KVCompareAndSet_Call) RunAndReturn(run func(string, []byte, []byte) (bool, *model.AppError)) *MockAPI_KVCompareAndSet_Call { + _c.Call.Return(run) + return _c +} + +// KVDelete provides a mock function with given fields: key +func (_m *MockAPI) KVDelete(key string) *model.AppError { + ret := _m.Called(key) + + if len(ret) == 0 { + panic("no return value specified for KVDelete") + } + + 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 +} + +// MockAPI_KVDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVDelete' +type MockAPI_KVDelete_Call struct { + *mock.Call +} + +// KVDelete is a helper method to define mock.On call +// - key string +func (_e *MockAPI_Expecter) KVDelete(key interface{}) *MockAPI_KVDelete_Call { + return &MockAPI_KVDelete_Call{Call: _e.mock.On("KVDelete", key)} +} + +func (_c *MockAPI_KVDelete_Call) Run(run func(key string)) *MockAPI_KVDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_KVDelete_Call) Return(_a0 *model.AppError) *MockAPI_KVDelete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_KVDelete_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_KVDelete_Call { + _c.Call.Return(run) + return _c +} + +// KVDeleteAll provides a mock function with given fields: +func (_m *MockAPI) KVDeleteAll() *model.AppError { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for KVDeleteAll") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func() *model.AppError); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_KVDeleteAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVDeleteAll' +type MockAPI_KVDeleteAll_Call struct { + *mock.Call +} + +// KVDeleteAll is a helper method to define mock.On call +func (_e *MockAPI_Expecter) KVDeleteAll() *MockAPI_KVDeleteAll_Call { + return &MockAPI_KVDeleteAll_Call{Call: _e.mock.On("KVDeleteAll")} +} + +func (_c *MockAPI_KVDeleteAll_Call) Run(run func()) *MockAPI_KVDeleteAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_KVDeleteAll_Call) Return(_a0 *model.AppError) *MockAPI_KVDeleteAll_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_KVDeleteAll_Call) RunAndReturn(run func() *model.AppError) *MockAPI_KVDeleteAll_Call { + _c.Call.Return(run) + return _c +} + +// KVGet provides a mock function with given fields: key +func (_m *MockAPI) KVGet(key string) ([]byte, *model.AppError) { + ret := _m.Called(key) + + if len(ret) == 0 { + panic("no return value specified for KVGet") + } + + var r0 []byte + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { + return rf(key) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + 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 +} + +// MockAPI_KVGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVGet' +type MockAPI_KVGet_Call struct { + *mock.Call +} + +// KVGet is a helper method to define mock.On call +// - key string +func (_e *MockAPI_Expecter) KVGet(key interface{}) *MockAPI_KVGet_Call { + return &MockAPI_KVGet_Call{Call: _e.mock.On("KVGet", key)} +} + +func (_c *MockAPI_KVGet_Call) Run(run func(key string)) *MockAPI_KVGet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_KVGet_Call) Return(_a0 []byte, _a1 *model.AppError) *MockAPI_KVGet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_KVGet_Call) RunAndReturn(run func(string) ([]byte, *model.AppError)) *MockAPI_KVGet_Call { + _c.Call.Return(run) + return _c +} + +// KVList provides a mock function with given fields: page, perPage +func (_m *MockAPI) KVList(page int, perPage int) ([]string, *model.AppError) { + ret := _m.Called(page, perPage) + + if len(ret) == 0 { + panic("no return value specified for KVList") + } + + var r0 []string + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok { + return rf(page, perPage) + } + if rf, ok := ret.Get(0).(func(int, int) []string); ok { + r0 = rf(page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok { + r1 = rf(page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_KVList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVList' +type MockAPI_KVList_Call struct { + *mock.Call +} + +// KVList is a helper method to define mock.On call +// - page int +// - perPage int +func (_e *MockAPI_Expecter) KVList(page interface{}, perPage interface{}) *MockAPI_KVList_Call { + return &MockAPI_KVList_Call{Call: _e.mock.On("KVList", page, perPage)} +} + +func (_c *MockAPI_KVList_Call) Run(run func(page int, perPage int)) *MockAPI_KVList_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int), args[1].(int)) + }) + return _c +} + +func (_c *MockAPI_KVList_Call) Return(_a0 []string, _a1 *model.AppError) *MockAPI_KVList_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_KVList_Call) RunAndReturn(run func(int, int) ([]string, *model.AppError)) *MockAPI_KVList_Call { + _c.Call.Return(run) + return _c +} + +// KVSet provides a mock function with given fields: key, value +func (_m *MockAPI) KVSet(key string, value []byte) *model.AppError { + ret := _m.Called(key, value) + + if len(ret) == 0 { + panic("no return value specified for KVSet") + } + + 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 +} + +// MockAPI_KVSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVSet' +type MockAPI_KVSet_Call struct { + *mock.Call +} + +// KVSet is a helper method to define mock.On call +// - key string +// - value []byte +func (_e *MockAPI_Expecter) KVSet(key interface{}, value interface{}) *MockAPI_KVSet_Call { + return &MockAPI_KVSet_Call{Call: _e.mock.On("KVSet", key, value)} +} + +func (_c *MockAPI_KVSet_Call) Run(run func(key string, value []byte)) *MockAPI_KVSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte)) + }) + return _c +} + +func (_c *MockAPI_KVSet_Call) Return(_a0 *model.AppError) *MockAPI_KVSet_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_KVSet_Call) RunAndReturn(run func(string, []byte) *model.AppError) *MockAPI_KVSet_Call { + _c.Call.Return(run) + return _c +} + +// KVSetWithExpiry provides a mock function with given fields: key, value, expireInSeconds +func (_m *MockAPI) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError { + ret := _m.Called(key, value, expireInSeconds) + + if len(ret) == 0 { + panic("no return value specified for KVSetWithExpiry") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte, int64) *model.AppError); ok { + r0 = rf(key, value, expireInSeconds) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_KVSetWithExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVSetWithExpiry' +type MockAPI_KVSetWithExpiry_Call struct { + *mock.Call +} + +// KVSetWithExpiry is a helper method to define mock.On call +// - key string +// - value []byte +// - expireInSeconds int64 +func (_e *MockAPI_Expecter) KVSetWithExpiry(key interface{}, value interface{}, expireInSeconds interface{}) *MockAPI_KVSetWithExpiry_Call { + return &MockAPI_KVSetWithExpiry_Call{Call: _e.mock.On("KVSetWithExpiry", key, value, expireInSeconds)} +} + +func (_c *MockAPI_KVSetWithExpiry_Call) Run(run func(key string, value []byte, expireInSeconds int64)) *MockAPI_KVSetWithExpiry_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte), args[2].(int64)) + }) + return _c +} + +func (_c *MockAPI_KVSetWithExpiry_Call) Return(_a0 *model.AppError) *MockAPI_KVSetWithExpiry_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_KVSetWithExpiry_Call) RunAndReturn(run func(string, []byte, int64) *model.AppError) *MockAPI_KVSetWithExpiry_Call { + _c.Call.Return(run) + return _c +} + +// KVSetWithOptions provides a mock function with given fields: key, value, options +func (_m *MockAPI) KVSetWithOptions(key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError) { + ret := _m.Called(key, value, options) + + if len(ret) == 0 { + panic("no return value specified for KVSetWithOptions") + } + + var r0 bool + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte, model.PluginKVSetOptions) (bool, *model.AppError)); ok { + return rf(key, value, options) + } + if rf, ok := ret.Get(0).(func(string, []byte, model.PluginKVSetOptions) bool); ok { + r0 = rf(key, value, options) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(string, []byte, model.PluginKVSetOptions) *model.AppError); ok { + r1 = rf(key, value, options) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_KVSetWithOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KVSetWithOptions' +type MockAPI_KVSetWithOptions_Call struct { + *mock.Call +} + +// KVSetWithOptions is a helper method to define mock.On call +// - key string +// - value []byte +// - options model.PluginKVSetOptions +func (_e *MockAPI_Expecter) KVSetWithOptions(key interface{}, value interface{}, options interface{}) *MockAPI_KVSetWithOptions_Call { + return &MockAPI_KVSetWithOptions_Call{Call: _e.mock.On("KVSetWithOptions", key, value, options)} +} + +func (_c *MockAPI_KVSetWithOptions_Call) Run(run func(key string, value []byte, options model.PluginKVSetOptions)) *MockAPI_KVSetWithOptions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte), args[2].(model.PluginKVSetOptions)) + }) + return _c +} + +func (_c *MockAPI_KVSetWithOptions_Call) Return(_a0 bool, _a1 *model.AppError) *MockAPI_KVSetWithOptions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_KVSetWithOptions_Call) RunAndReturn(run func(string, []byte, model.PluginKVSetOptions) (bool, *model.AppError)) *MockAPI_KVSetWithOptions_Call { + _c.Call.Return(run) + return _c +} + +// ListBuiltInCommands provides a mock function with given fields: +func (_m *MockAPI) ListBuiltInCommands() ([]*model.Command, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ListBuiltInCommands") + } + + var r0 []*model.Command + var r1 error + if rf, ok := ret.Get(0).(func() ([]*model.Command, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []*model.Command); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Command) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ListBuiltInCommands_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBuiltInCommands' +type MockAPI_ListBuiltInCommands_Call struct { + *mock.Call +} + +// ListBuiltInCommands is a helper method to define mock.On call +func (_e *MockAPI_Expecter) ListBuiltInCommands() *MockAPI_ListBuiltInCommands_Call { + return &MockAPI_ListBuiltInCommands_Call{Call: _e.mock.On("ListBuiltInCommands")} +} + +func (_c *MockAPI_ListBuiltInCommands_Call) Run(run func()) *MockAPI_ListBuiltInCommands_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPI_ListBuiltInCommands_Call) Return(_a0 []*model.Command, _a1 error) *MockAPI_ListBuiltInCommands_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ListBuiltInCommands_Call) RunAndReturn(run func() ([]*model.Command, error)) *MockAPI_ListBuiltInCommands_Call { + _c.Call.Return(run) + return _c +} + +// ListCommands provides a mock function with given fields: teamID +func (_m *MockAPI) ListCommands(teamID string) ([]*model.Command, error) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for ListCommands") + } + + var r0 []*model.Command + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) []*model.Command); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(teamID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ListCommands_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCommands' +type MockAPI_ListCommands_Call struct { + *mock.Call +} + +// ListCommands is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) ListCommands(teamID interface{}) *MockAPI_ListCommands_Call { + return &MockAPI_ListCommands_Call{Call: _e.mock.On("ListCommands", teamID)} +} + +func (_c *MockAPI_ListCommands_Call) Run(run func(teamID string)) *MockAPI_ListCommands_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_ListCommands_Call) Return(_a0 []*model.Command, _a1 error) *MockAPI_ListCommands_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ListCommands_Call) RunAndReturn(run func(string) ([]*model.Command, error)) *MockAPI_ListCommands_Call { + _c.Call.Return(run) + return _c +} + +// ListCustomCommands provides a mock function with given fields: teamID +func (_m *MockAPI) ListCustomCommands(teamID string) ([]*model.Command, error) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for ListCustomCommands") + } + + var r0 []*model.Command + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) []*model.Command); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(teamID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ListCustomCommands_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCustomCommands' +type MockAPI_ListCustomCommands_Call struct { + *mock.Call +} + +// ListCustomCommands is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) ListCustomCommands(teamID interface{}) *MockAPI_ListCustomCommands_Call { + return &MockAPI_ListCustomCommands_Call{Call: _e.mock.On("ListCustomCommands", teamID)} +} + +func (_c *MockAPI_ListCustomCommands_Call) Run(run func(teamID string)) *MockAPI_ListCustomCommands_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_ListCustomCommands_Call) Return(_a0 []*model.Command, _a1 error) *MockAPI_ListCustomCommands_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ListCustomCommands_Call) RunAndReturn(run func(string) ([]*model.Command, error)) *MockAPI_ListCustomCommands_Call { + _c.Call.Return(run) + return _c +} + +// ListPluginCommands provides a mock function with given fields: teamID +func (_m *MockAPI) ListPluginCommands(teamID string) ([]*model.Command, error) { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for ListPluginCommands") + } + + var r0 []*model.Command + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok { + return rf(teamID) + } + if rf, ok := ret.Get(0).(func(string) []*model.Command); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(teamID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ListPluginCommands_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPluginCommands' +type MockAPI_ListPluginCommands_Call struct { + *mock.Call +} + +// ListPluginCommands is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) ListPluginCommands(teamID interface{}) *MockAPI_ListPluginCommands_Call { + return &MockAPI_ListPluginCommands_Call{Call: _e.mock.On("ListPluginCommands", teamID)} +} + +func (_c *MockAPI_ListPluginCommands_Call) Run(run func(teamID string)) *MockAPI_ListPluginCommands_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_ListPluginCommands_Call) Return(_a0 []*model.Command, _a1 error) *MockAPI_ListPluginCommands_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ListPluginCommands_Call) RunAndReturn(run func(string) ([]*model.Command, error)) *MockAPI_ListPluginCommands_Call { + _c.Call.Return(run) + return _c +} + +// LoadPluginConfiguration provides a mock function with given fields: dest +func (_m *MockAPI) LoadPluginConfiguration(dest interface{}) error { + ret := _m.Called(dest) + + if len(ret) == 0 { + panic("no return value specified for LoadPluginConfiguration") + } + + var r0 error + if rf, ok := ret.Get(0).(func(interface{}) error); ok { + r0 = rf(dest) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_LoadPluginConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadPluginConfiguration' +type MockAPI_LoadPluginConfiguration_Call struct { + *mock.Call +} + +// LoadPluginConfiguration is a helper method to define mock.On call +// - dest interface{} +func (_e *MockAPI_Expecter) LoadPluginConfiguration(dest interface{}) *MockAPI_LoadPluginConfiguration_Call { + return &MockAPI_LoadPluginConfiguration_Call{Call: _e.mock.On("LoadPluginConfiguration", dest)} +} + +func (_c *MockAPI_LoadPluginConfiguration_Call) Run(run func(dest interface{})) *MockAPI_LoadPluginConfiguration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockAPI_LoadPluginConfiguration_Call) Return(_a0 error) *MockAPI_LoadPluginConfiguration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_LoadPluginConfiguration_Call) RunAndReturn(run func(interface{}) error) *MockAPI_LoadPluginConfiguration_Call { + _c.Call.Return(run) + return _c +} + +// LogDebug provides a mock function with given fields: msg, keyValuePairs +func (_m *MockAPI) LogDebug(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// MockAPI_LogDebug_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogDebug' +type MockAPI_LogDebug_Call struct { + *mock.Call +} + +// LogDebug is a helper method to define mock.On call +// - msg string +// - keyValuePairs ...interface{} +func (_e *MockAPI_Expecter) LogDebug(msg interface{}, keyValuePairs ...interface{}) *MockAPI_LogDebug_Call { + return &MockAPI_LogDebug_Call{Call: _e.mock.On("LogDebug", + append([]interface{}{msg}, keyValuePairs...)...)} +} + +func (_c *MockAPI_LogDebug_Call) Run(run func(msg string, keyValuePairs ...interface{})) *MockAPI_LogDebug_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockAPI_LogDebug_Call) Return() *MockAPI_LogDebug_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_LogDebug_Call) RunAndReturn(run func(string, ...interface{})) *MockAPI_LogDebug_Call { + _c.Call.Return(run) + return _c +} + +// LogError provides a mock function with given fields: msg, keyValuePairs +func (_m *MockAPI) LogError(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// MockAPI_LogError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogError' +type MockAPI_LogError_Call struct { + *mock.Call +} + +// LogError is a helper method to define mock.On call +// - msg string +// - keyValuePairs ...interface{} +func (_e *MockAPI_Expecter) LogError(msg interface{}, keyValuePairs ...interface{}) *MockAPI_LogError_Call { + return &MockAPI_LogError_Call{Call: _e.mock.On("LogError", + append([]interface{}{msg}, keyValuePairs...)...)} +} + +func (_c *MockAPI_LogError_Call) Run(run func(msg string, keyValuePairs ...interface{})) *MockAPI_LogError_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockAPI_LogError_Call) Return() *MockAPI_LogError_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_LogError_Call) RunAndReturn(run func(string, ...interface{})) *MockAPI_LogError_Call { + _c.Call.Return(run) + return _c +} + +// LogInfo provides a mock function with given fields: msg, keyValuePairs +func (_m *MockAPI) LogInfo(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// MockAPI_LogInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogInfo' +type MockAPI_LogInfo_Call struct { + *mock.Call +} + +// LogInfo is a helper method to define mock.On call +// - msg string +// - keyValuePairs ...interface{} +func (_e *MockAPI_Expecter) LogInfo(msg interface{}, keyValuePairs ...interface{}) *MockAPI_LogInfo_Call { + return &MockAPI_LogInfo_Call{Call: _e.mock.On("LogInfo", + append([]interface{}{msg}, keyValuePairs...)...)} +} + +func (_c *MockAPI_LogInfo_Call) Run(run func(msg string, keyValuePairs ...interface{})) *MockAPI_LogInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockAPI_LogInfo_Call) Return() *MockAPI_LogInfo_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_LogInfo_Call) RunAndReturn(run func(string, ...interface{})) *MockAPI_LogInfo_Call { + _c.Call.Return(run) + return _c +} + +// LogWarn provides a mock function with given fields: msg, keyValuePairs +func (_m *MockAPI) LogWarn(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// MockAPI_LogWarn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogWarn' +type MockAPI_LogWarn_Call struct { + *mock.Call +} + +// LogWarn is a helper method to define mock.On call +// - msg string +// - keyValuePairs ...interface{} +func (_e *MockAPI_Expecter) LogWarn(msg interface{}, keyValuePairs ...interface{}) *MockAPI_LogWarn_Call { + return &MockAPI_LogWarn_Call{Call: _e.mock.On("LogWarn", + append([]interface{}{msg}, keyValuePairs...)...)} +} + +func (_c *MockAPI_LogWarn_Call) Run(run func(msg string, keyValuePairs ...interface{})) *MockAPI_LogWarn_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockAPI_LogWarn_Call) Return() *MockAPI_LogWarn_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_LogWarn_Call) RunAndReturn(run func(string, ...interface{})) *MockAPI_LogWarn_Call { + _c.Call.Return(run) + return _c +} + +// OpenInteractiveDialog provides a mock function with given fields: dialog +func (_m *MockAPI) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError { + ret := _m.Called(dialog) + + if len(ret) == 0 { + panic("no return value specified for OpenInteractiveDialog") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(model.OpenDialogRequest) *model.AppError); ok { + r0 = rf(dialog) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_OpenInteractiveDialog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenInteractiveDialog' +type MockAPI_OpenInteractiveDialog_Call struct { + *mock.Call +} + +// OpenInteractiveDialog is a helper method to define mock.On call +// - dialog model.OpenDialogRequest +func (_e *MockAPI_Expecter) OpenInteractiveDialog(dialog interface{}) *MockAPI_OpenInteractiveDialog_Call { + return &MockAPI_OpenInteractiveDialog_Call{Call: _e.mock.On("OpenInteractiveDialog", dialog)} +} + +func (_c *MockAPI_OpenInteractiveDialog_Call) Run(run func(dialog model.OpenDialogRequest)) *MockAPI_OpenInteractiveDialog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.OpenDialogRequest)) + }) + return _c +} + +func (_c *MockAPI_OpenInteractiveDialog_Call) Return(_a0 *model.AppError) *MockAPI_OpenInteractiveDialog_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_OpenInteractiveDialog_Call) RunAndReturn(run func(model.OpenDialogRequest) *model.AppError) *MockAPI_OpenInteractiveDialog_Call { + _c.Call.Return(run) + return _c +} + +// PatchBot provides a mock function with given fields: botUserId, botPatch +func (_m *MockAPI) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError) { + ret := _m.Called(botUserId, botPatch) + + if len(ret) == 0 { + panic("no return value specified for PatchBot") + } + + var r0 *model.Bot + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, *model.BotPatch) (*model.Bot, *model.AppError)); ok { + return rf(botUserId, botPatch) + } + if rf, ok := ret.Get(0).(func(string, *model.BotPatch) *model.Bot); ok { + r0 = rf(botUserId, botPatch) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Bot) + } + } + + if rf, ok := ret.Get(1).(func(string, *model.BotPatch) *model.AppError); ok { + r1 = rf(botUserId, botPatch) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_PatchBot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchBot' +type MockAPI_PatchBot_Call struct { + *mock.Call +} + +// PatchBot is a helper method to define mock.On call +// - botUserId string +// - botPatch *model.BotPatch +func (_e *MockAPI_Expecter) PatchBot(botUserId interface{}, botPatch interface{}) *MockAPI_PatchBot_Call { + return &MockAPI_PatchBot_Call{Call: _e.mock.On("PatchBot", botUserId, botPatch)} +} + +func (_c *MockAPI_PatchBot_Call) Run(run func(botUserId string, botPatch *model.BotPatch)) *MockAPI_PatchBot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.BotPatch)) + }) + return _c +} + +func (_c *MockAPI_PatchBot_Call) Return(_a0 *model.Bot, _a1 *model.AppError) *MockAPI_PatchBot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_PatchBot_Call) RunAndReturn(run func(string, *model.BotPatch) (*model.Bot, *model.AppError)) *MockAPI_PatchBot_Call { + _c.Call.Return(run) + return _c +} + +// PatchChannelMembersNotifications provides a mock function with given fields: members, notifyProps +func (_m *MockAPI) PatchChannelMembersNotifications(members []*model.ChannelMemberIdentifier, notifyProps map[string]string) *model.AppError { + ret := _m.Called(members, notifyProps) + + if len(ret) == 0 { + panic("no return value specified for PatchChannelMembersNotifications") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func([]*model.ChannelMemberIdentifier, map[string]string) *model.AppError); ok { + r0 = rf(members, notifyProps) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_PatchChannelMembersNotifications_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchChannelMembersNotifications' +type MockAPI_PatchChannelMembersNotifications_Call struct { + *mock.Call +} + +// PatchChannelMembersNotifications is a helper method to define mock.On call +// - members []*model.ChannelMemberIdentifier +// - notifyProps map[string]string +func (_e *MockAPI_Expecter) PatchChannelMembersNotifications(members interface{}, notifyProps interface{}) *MockAPI_PatchChannelMembersNotifications_Call { + return &MockAPI_PatchChannelMembersNotifications_Call{Call: _e.mock.On("PatchChannelMembersNotifications", members, notifyProps)} +} + +func (_c *MockAPI_PatchChannelMembersNotifications_Call) Run(run func(members []*model.ChannelMemberIdentifier, notifyProps map[string]string)) *MockAPI_PatchChannelMembersNotifications_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]*model.ChannelMemberIdentifier), args[1].(map[string]string)) + }) + return _c +} + +func (_c *MockAPI_PatchChannelMembersNotifications_Call) Return(_a0 *model.AppError) *MockAPI_PatchChannelMembersNotifications_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_PatchChannelMembersNotifications_Call) RunAndReturn(run func([]*model.ChannelMemberIdentifier, map[string]string) *model.AppError) *MockAPI_PatchChannelMembersNotifications_Call { + _c.Call.Return(run) + return _c +} + +// PermanentDeleteBot provides a mock function with given fields: botUserId +func (_m *MockAPI) PermanentDeleteBot(botUserId string) *model.AppError { + ret := _m.Called(botUserId) + + if len(ret) == 0 { + panic("no return value specified for PermanentDeleteBot") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(botUserId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_PermanentDeleteBot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PermanentDeleteBot' +type MockAPI_PermanentDeleteBot_Call struct { + *mock.Call +} + +// PermanentDeleteBot is a helper method to define mock.On call +// - botUserId string +func (_e *MockAPI_Expecter) PermanentDeleteBot(botUserId interface{}) *MockAPI_PermanentDeleteBot_Call { + return &MockAPI_PermanentDeleteBot_Call{Call: _e.mock.On("PermanentDeleteBot", botUserId)} +} + +func (_c *MockAPI_PermanentDeleteBot_Call) Run(run func(botUserId string)) *MockAPI_PermanentDeleteBot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_PermanentDeleteBot_Call) Return(_a0 *model.AppError) *MockAPI_PermanentDeleteBot_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_PermanentDeleteBot_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_PermanentDeleteBot_Call { + _c.Call.Return(run) + return _c +} + +// PluginHTTP provides a mock function with given fields: request +func (_m *MockAPI) PluginHTTP(request *http.Request) *http.Response { + ret := _m.Called(request) + + if len(ret) == 0 { + panic("no return value specified for PluginHTTP") + } + + var r0 *http.Response + if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok { + r0 = rf(request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*http.Response) + } + } + + return r0 +} + +// MockAPI_PluginHTTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PluginHTTP' +type MockAPI_PluginHTTP_Call struct { + *mock.Call +} + +// PluginHTTP is a helper method to define mock.On call +// - request *http.Request +func (_e *MockAPI_Expecter) PluginHTTP(request interface{}) *MockAPI_PluginHTTP_Call { + return &MockAPI_PluginHTTP_Call{Call: _e.mock.On("PluginHTTP", request)} +} + +func (_c *MockAPI_PluginHTTP_Call) Run(run func(request *http.Request)) *MockAPI_PluginHTTP_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*http.Request)) + }) + return _c +} + +func (_c *MockAPI_PluginHTTP_Call) Return(_a0 *http.Response) *MockAPI_PluginHTTP_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_PluginHTTP_Call) RunAndReturn(run func(*http.Request) *http.Response) *MockAPI_PluginHTTP_Call { + _c.Call.Return(run) + return _c +} + +// PublishPluginClusterEvent provides a mock function with given fields: ev, opts +func (_m *MockAPI) PublishPluginClusterEvent(ev model.PluginClusterEvent, opts model.PluginClusterEventSendOptions) error { + ret := _m.Called(ev, opts) + + if len(ret) == 0 { + panic("no return value specified for PublishPluginClusterEvent") + } + + var r0 error + if rf, ok := ret.Get(0).(func(model.PluginClusterEvent, model.PluginClusterEventSendOptions) error); ok { + r0 = rf(ev, opts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_PublishPluginClusterEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishPluginClusterEvent' +type MockAPI_PublishPluginClusterEvent_Call struct { + *mock.Call +} + +// PublishPluginClusterEvent is a helper method to define mock.On call +// - ev model.PluginClusterEvent +// - opts model.PluginClusterEventSendOptions +func (_e *MockAPI_Expecter) PublishPluginClusterEvent(ev interface{}, opts interface{}) *MockAPI_PublishPluginClusterEvent_Call { + return &MockAPI_PublishPluginClusterEvent_Call{Call: _e.mock.On("PublishPluginClusterEvent", ev, opts)} +} + +func (_c *MockAPI_PublishPluginClusterEvent_Call) Run(run func(ev model.PluginClusterEvent, opts model.PluginClusterEventSendOptions)) *MockAPI_PublishPluginClusterEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.PluginClusterEvent), args[1].(model.PluginClusterEventSendOptions)) + }) + return _c +} + +func (_c *MockAPI_PublishPluginClusterEvent_Call) Return(_a0 error) *MockAPI_PublishPluginClusterEvent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_PublishPluginClusterEvent_Call) RunAndReturn(run func(model.PluginClusterEvent, model.PluginClusterEventSendOptions) error) *MockAPI_PublishPluginClusterEvent_Call { + _c.Call.Return(run) + return _c +} + +// PublishUserTyping provides a mock function with given fields: userID, channelId, parentId +func (_m *MockAPI) PublishUserTyping(userID string, channelId string, parentId string) *model.AppError { + ret := _m.Called(userID, channelId, parentId) + + if len(ret) == 0 { + panic("no return value specified for PublishUserTyping") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { + r0 = rf(userID, channelId, parentId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_PublishUserTyping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishUserTyping' +type MockAPI_PublishUserTyping_Call struct { + *mock.Call +} + +// PublishUserTyping is a helper method to define mock.On call +// - userID string +// - channelId string +// - parentId string +func (_e *MockAPI_Expecter) PublishUserTyping(userID interface{}, channelId interface{}, parentId interface{}) *MockAPI_PublishUserTyping_Call { + return &MockAPI_PublishUserTyping_Call{Call: _e.mock.On("PublishUserTyping", userID, channelId, parentId)} +} + +func (_c *MockAPI_PublishUserTyping_Call) Run(run func(userID string, channelId string, parentId string)) *MockAPI_PublishUserTyping_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_PublishUserTyping_Call) Return(_a0 *model.AppError) *MockAPI_PublishUserTyping_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_PublishUserTyping_Call) RunAndReturn(run func(string, string, string) *model.AppError) *MockAPI_PublishUserTyping_Call { + _c.Call.Return(run) + return _c +} + +// PublishWebSocketEvent provides a mock function with given fields: event, payload, broadcast +func (_m *MockAPI) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) { + _m.Called(event, payload, broadcast) +} + +// MockAPI_PublishWebSocketEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishWebSocketEvent' +type MockAPI_PublishWebSocketEvent_Call struct { + *mock.Call +} + +// PublishWebSocketEvent is a helper method to define mock.On call +// - event string +// - payload map[string]interface{} +// - broadcast *model.WebsocketBroadcast +func (_e *MockAPI_Expecter) PublishWebSocketEvent(event interface{}, payload interface{}, broadcast interface{}) *MockAPI_PublishWebSocketEvent_Call { + return &MockAPI_PublishWebSocketEvent_Call{Call: _e.mock.On("PublishWebSocketEvent", event, payload, broadcast)} +} + +func (_c *MockAPI_PublishWebSocketEvent_Call) Run(run func(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)) *MockAPI_PublishWebSocketEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(map[string]interface{}), args[2].(*model.WebsocketBroadcast)) + }) + return _c +} + +func (_c *MockAPI_PublishWebSocketEvent_Call) Return() *MockAPI_PublishWebSocketEvent_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPI_PublishWebSocketEvent_Call) RunAndReturn(run func(string, map[string]interface{}, *model.WebsocketBroadcast)) *MockAPI_PublishWebSocketEvent_Call { + _c.Call.Return(run) + return _c +} + +// ReadFile provides a mock function with given fields: path +func (_m *MockAPI) ReadFile(path string) ([]byte, *model.AppError) { + ret := _m.Called(path) + + if len(ret) == 0 { + panic("no return value specified for ReadFile") + } + + var r0 []byte + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]byte, *model.AppError)); ok { + return rf(path) + } + if rf, ok := ret.Get(0).(func(string) []byte); ok { + r0 = rf(path) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(path) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_ReadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFile' +type MockAPI_ReadFile_Call struct { + *mock.Call +} + +// ReadFile is a helper method to define mock.On call +// - path string +func (_e *MockAPI_Expecter) ReadFile(path interface{}) *MockAPI_ReadFile_Call { + return &MockAPI_ReadFile_Call{Call: _e.mock.On("ReadFile", path)} +} + +func (_c *MockAPI_ReadFile_Call) Run(run func(path string)) *MockAPI_ReadFile_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_ReadFile_Call) Return(_a0 []byte, _a1 *model.AppError) *MockAPI_ReadFile_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ReadFile_Call) RunAndReturn(run func(string) ([]byte, *model.AppError)) *MockAPI_ReadFile_Call { + _c.Call.Return(run) + return _c +} + +// RegisterCollectionAndTopic provides a mock function with given fields: collectionType, topicType +func (_m *MockAPI) RegisterCollectionAndTopic(collectionType string, topicType string) error { + ret := _m.Called(collectionType, topicType) + + if len(ret) == 0 { + panic("no return value specified for RegisterCollectionAndTopic") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(collectionType, topicType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_RegisterCollectionAndTopic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterCollectionAndTopic' +type MockAPI_RegisterCollectionAndTopic_Call struct { + *mock.Call +} + +// RegisterCollectionAndTopic is a helper method to define mock.On call +// - collectionType string +// - topicType string +func (_e *MockAPI_Expecter) RegisterCollectionAndTopic(collectionType interface{}, topicType interface{}) *MockAPI_RegisterCollectionAndTopic_Call { + return &MockAPI_RegisterCollectionAndTopic_Call{Call: _e.mock.On("RegisterCollectionAndTopic", collectionType, topicType)} +} + +func (_c *MockAPI_RegisterCollectionAndTopic_Call) Run(run func(collectionType string, topicType string)) *MockAPI_RegisterCollectionAndTopic_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_RegisterCollectionAndTopic_Call) Return(_a0 error) *MockAPI_RegisterCollectionAndTopic_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RegisterCollectionAndTopic_Call) RunAndReturn(run func(string, string) error) *MockAPI_RegisterCollectionAndTopic_Call { + _c.Call.Return(run) + return _c +} + +// RegisterCommand provides a mock function with given fields: command +func (_m *MockAPI) RegisterCommand(command *model.Command) error { + ret := _m.Called(command) + + if len(ret) == 0 { + panic("no return value specified for RegisterCommand") + } + + var r0 error + if rf, ok := ret.Get(0).(func(*model.Command) error); ok { + r0 = rf(command) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_RegisterCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterCommand' +type MockAPI_RegisterCommand_Call struct { + *mock.Call +} + +// RegisterCommand is a helper method to define mock.On call +// - command *model.Command +func (_e *MockAPI_Expecter) RegisterCommand(command interface{}) *MockAPI_RegisterCommand_Call { + return &MockAPI_RegisterCommand_Call{Call: _e.mock.On("RegisterCommand", command)} +} + +func (_c *MockAPI_RegisterCommand_Call) Run(run func(command *model.Command)) *MockAPI_RegisterCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Command)) + }) + return _c +} + +func (_c *MockAPI_RegisterCommand_Call) Return(_a0 error) *MockAPI_RegisterCommand_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RegisterCommand_Call) RunAndReturn(run func(*model.Command) error) *MockAPI_RegisterCommand_Call { + _c.Call.Return(run) + return _c +} + +// RegisterPluginForSharedChannels provides a mock function with given fields: opts +func (_m *MockAPI) RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (string, error) { + ret := _m.Called(opts) + + if len(ret) == 0 { + panic("no return value specified for RegisterPluginForSharedChannels") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(model.RegisterPluginOpts) (string, error)); ok { + return rf(opts) + } + if rf, ok := ret.Get(0).(func(model.RegisterPluginOpts) string); ok { + r0 = rf(opts) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(model.RegisterPluginOpts) error); ok { + r1 = rf(opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_RegisterPluginForSharedChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterPluginForSharedChannels' +type MockAPI_RegisterPluginForSharedChannels_Call struct { + *mock.Call +} + +// RegisterPluginForSharedChannels is a helper method to define mock.On call +// - opts model.RegisterPluginOpts +func (_e *MockAPI_Expecter) RegisterPluginForSharedChannels(opts interface{}) *MockAPI_RegisterPluginForSharedChannels_Call { + return &MockAPI_RegisterPluginForSharedChannels_Call{Call: _e.mock.On("RegisterPluginForSharedChannels", opts)} +} + +func (_c *MockAPI_RegisterPluginForSharedChannels_Call) Run(run func(opts model.RegisterPluginOpts)) *MockAPI_RegisterPluginForSharedChannels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.RegisterPluginOpts)) + }) + return _c +} + +func (_c *MockAPI_RegisterPluginForSharedChannels_Call) Return(remoteID string, err error) *MockAPI_RegisterPluginForSharedChannels_Call { + _c.Call.Return(remoteID, err) + return _c +} + +func (_c *MockAPI_RegisterPluginForSharedChannels_Call) RunAndReturn(run func(model.RegisterPluginOpts) (string, error)) *MockAPI_RegisterPluginForSharedChannels_Call { + _c.Call.Return(run) + return _c +} + +// RemovePlugin provides a mock function with given fields: id +func (_m *MockAPI) RemovePlugin(id string) *model.AppError { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for RemovePlugin") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RemovePlugin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePlugin' +type MockAPI_RemovePlugin_Call struct { + *mock.Call +} + +// RemovePlugin is a helper method to define mock.On call +// - id string +func (_e *MockAPI_Expecter) RemovePlugin(id interface{}) *MockAPI_RemovePlugin_Call { + return &MockAPI_RemovePlugin_Call{Call: _e.mock.On("RemovePlugin", id)} +} + +func (_c *MockAPI_RemovePlugin_Call) Run(run func(id string)) *MockAPI_RemovePlugin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_RemovePlugin_Call) Return(_a0 *model.AppError) *MockAPI_RemovePlugin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RemovePlugin_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_RemovePlugin_Call { + _c.Call.Return(run) + return _c +} + +// RemoveReaction provides a mock function with given fields: reaction +func (_m *MockAPI) RemoveReaction(reaction *model.Reaction) *model.AppError { + ret := _m.Called(reaction) + + if len(ret) == 0 { + panic("no return value specified for RemoveReaction") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Reaction) *model.AppError); ok { + r0 = rf(reaction) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RemoveReaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveReaction' +type MockAPI_RemoveReaction_Call struct { + *mock.Call +} + +// RemoveReaction is a helper method to define mock.On call +// - reaction *model.Reaction +func (_e *MockAPI_Expecter) RemoveReaction(reaction interface{}) *MockAPI_RemoveReaction_Call { + return &MockAPI_RemoveReaction_Call{Call: _e.mock.On("RemoveReaction", reaction)} +} + +func (_c *MockAPI_RemoveReaction_Call) Run(run func(reaction *model.Reaction)) *MockAPI_RemoveReaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Reaction)) + }) + return _c +} + +func (_c *MockAPI_RemoveReaction_Call) Return(_a0 *model.AppError) *MockAPI_RemoveReaction_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RemoveReaction_Call) RunAndReturn(run func(*model.Reaction) *model.AppError) *MockAPI_RemoveReaction_Call { + _c.Call.Return(run) + return _c +} + +// RemoveTeamIcon provides a mock function with given fields: teamID +func (_m *MockAPI) RemoveTeamIcon(teamID string) *model.AppError { + ret := _m.Called(teamID) + + if len(ret) == 0 { + panic("no return value specified for RemoveTeamIcon") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(teamID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RemoveTeamIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTeamIcon' +type MockAPI_RemoveTeamIcon_Call struct { + *mock.Call +} + +// RemoveTeamIcon is a helper method to define mock.On call +// - teamID string +func (_e *MockAPI_Expecter) RemoveTeamIcon(teamID interface{}) *MockAPI_RemoveTeamIcon_Call { + return &MockAPI_RemoveTeamIcon_Call{Call: _e.mock.On("RemoveTeamIcon", teamID)} +} + +func (_c *MockAPI_RemoveTeamIcon_Call) Run(run func(teamID string)) *MockAPI_RemoveTeamIcon_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_RemoveTeamIcon_Call) Return(_a0 *model.AppError) *MockAPI_RemoveTeamIcon_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RemoveTeamIcon_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_RemoveTeamIcon_Call { + _c.Call.Return(run) + return _c +} + +// RemoveUserCustomStatus provides a mock function with given fields: userID +func (_m *MockAPI) RemoveUserCustomStatus(userID string) *model.AppError { + ret := _m.Called(userID) + + if len(ret) == 0 { + panic("no return value specified for RemoveUserCustomStatus") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RemoveUserCustomStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveUserCustomStatus' +type MockAPI_RemoveUserCustomStatus_Call struct { + *mock.Call +} + +// RemoveUserCustomStatus is a helper method to define mock.On call +// - userID string +func (_e *MockAPI_Expecter) RemoveUserCustomStatus(userID interface{}) *MockAPI_RemoveUserCustomStatus_Call { + return &MockAPI_RemoveUserCustomStatus_Call{Call: _e.mock.On("RemoveUserCustomStatus", userID)} +} + +func (_c *MockAPI_RemoveUserCustomStatus_Call) Run(run func(userID string)) *MockAPI_RemoveUserCustomStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_RemoveUserCustomStatus_Call) Return(_a0 *model.AppError) *MockAPI_RemoveUserCustomStatus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RemoveUserCustomStatus_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_RemoveUserCustomStatus_Call { + _c.Call.Return(run) + return _c +} + +// RequestTrialLicense provides a mock function with given fields: requesterID, users, termsAccepted, receiveEmailsAccepted +func (_m *MockAPI) RequestTrialLicense(requesterID string, users int, termsAccepted bool, receiveEmailsAccepted bool) *model.AppError { + ret := _m.Called(requesterID, users, termsAccepted, receiveEmailsAccepted) + + if len(ret) == 0 { + panic("no return value specified for RequestTrialLicense") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, int, bool, bool) *model.AppError); ok { + r0 = rf(requesterID, users, termsAccepted, receiveEmailsAccepted) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RequestTrialLicense_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestTrialLicense' +type MockAPI_RequestTrialLicense_Call struct { + *mock.Call +} + +// RequestTrialLicense is a helper method to define mock.On call +// - requesterID string +// - users int +// - termsAccepted bool +// - receiveEmailsAccepted bool +func (_e *MockAPI_Expecter) RequestTrialLicense(requesterID interface{}, users interface{}, termsAccepted interface{}, receiveEmailsAccepted interface{}) *MockAPI_RequestTrialLicense_Call { + return &MockAPI_RequestTrialLicense_Call{Call: _e.mock.On("RequestTrialLicense", requesterID, users, termsAccepted, receiveEmailsAccepted)} +} + +func (_c *MockAPI_RequestTrialLicense_Call) Run(run func(requesterID string, users int, termsAccepted bool, receiveEmailsAccepted bool)) *MockAPI_RequestTrialLicense_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int), args[2].(bool), args[3].(bool)) + }) + return _c +} + +func (_c *MockAPI_RequestTrialLicense_Call) Return(_a0 *model.AppError) *MockAPI_RequestTrialLicense_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RequestTrialLicense_Call) RunAndReturn(run func(string, int, bool, bool) *model.AppError) *MockAPI_RequestTrialLicense_Call { + _c.Call.Return(run) + return _c +} + +// RevokeSession provides a mock function with given fields: sessionID +func (_m *MockAPI) RevokeSession(sessionID string) *model.AppError { + ret := _m.Called(sessionID) + + if len(ret) == 0 { + panic("no return value specified for RevokeSession") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(sessionID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RevokeSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeSession' +type MockAPI_RevokeSession_Call struct { + *mock.Call +} + +// RevokeSession is a helper method to define mock.On call +// - sessionID string +func (_e *MockAPI_Expecter) RevokeSession(sessionID interface{}) *MockAPI_RevokeSession_Call { + return &MockAPI_RevokeSession_Call{Call: _e.mock.On("RevokeSession", sessionID)} +} + +func (_c *MockAPI_RevokeSession_Call) Run(run func(sessionID string)) *MockAPI_RevokeSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_RevokeSession_Call) Return(_a0 *model.AppError) *MockAPI_RevokeSession_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RevokeSession_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_RevokeSession_Call { + _c.Call.Return(run) + return _c +} + +// RevokeUserAccessToken provides a mock function with given fields: tokenID +func (_m *MockAPI) RevokeUserAccessToken(tokenID string) *model.AppError { + ret := _m.Called(tokenID) + + if len(ret) == 0 { + panic("no return value specified for RevokeUserAccessToken") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { + r0 = rf(tokenID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_RevokeUserAccessToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeUserAccessToken' +type MockAPI_RevokeUserAccessToken_Call struct { + *mock.Call +} + +// RevokeUserAccessToken is a helper method to define mock.On call +// - tokenID string +func (_e *MockAPI_Expecter) RevokeUserAccessToken(tokenID interface{}) *MockAPI_RevokeUserAccessToken_Call { + return &MockAPI_RevokeUserAccessToken_Call{Call: _e.mock.On("RevokeUserAccessToken", tokenID)} +} + +func (_c *MockAPI_RevokeUserAccessToken_Call) Run(run func(tokenID string)) *MockAPI_RevokeUserAccessToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_RevokeUserAccessToken_Call) Return(_a0 *model.AppError) *MockAPI_RevokeUserAccessToken_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RevokeUserAccessToken_Call) RunAndReturn(run func(string) *model.AppError) *MockAPI_RevokeUserAccessToken_Call { + _c.Call.Return(run) + return _c +} + +// RolesGrantPermission provides a mock function with given fields: roleNames, permissionId +func (_m *MockAPI) RolesGrantPermission(roleNames []string, permissionId string) bool { + ret := _m.Called(roleNames, permissionId) + + if len(ret) == 0 { + panic("no return value specified for RolesGrantPermission") + } + + var r0 bool + if rf, ok := ret.Get(0).(func([]string, string) bool); ok { + r0 = rf(roleNames, permissionId) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAPI_RolesGrantPermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RolesGrantPermission' +type MockAPI_RolesGrantPermission_Call struct { + *mock.Call +} + +// RolesGrantPermission is a helper method to define mock.On call +// - roleNames []string +// - permissionId string +func (_e *MockAPI_Expecter) RolesGrantPermission(roleNames interface{}, permissionId interface{}) *MockAPI_RolesGrantPermission_Call { + return &MockAPI_RolesGrantPermission_Call{Call: _e.mock.On("RolesGrantPermission", roleNames, permissionId)} +} + +func (_c *MockAPI_RolesGrantPermission_Call) Run(run func(roleNames []string, permissionId string)) *MockAPI_RolesGrantPermission_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_RolesGrantPermission_Call) Return(_a0 bool) *MockAPI_RolesGrantPermission_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_RolesGrantPermission_Call) RunAndReturn(run func([]string, string) bool) *MockAPI_RolesGrantPermission_Call { + _c.Call.Return(run) + return _c +} + +// SaveConfig provides a mock function with given fields: config +func (_m *MockAPI) SaveConfig(config *model.Config) *model.AppError { + ret := _m.Called(config) + + if len(ret) == 0 { + panic("no return value specified for SaveConfig") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Config) *model.AppError); ok { + r0 = rf(config) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SaveConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveConfig' +type MockAPI_SaveConfig_Call struct { + *mock.Call +} + +// SaveConfig is a helper method to define mock.On call +// - config *model.Config +func (_e *MockAPI_Expecter) SaveConfig(config interface{}) *MockAPI_SaveConfig_Call { + return &MockAPI_SaveConfig_Call{Call: _e.mock.On("SaveConfig", config)} +} + +func (_c *MockAPI_SaveConfig_Call) Run(run func(config *model.Config)) *MockAPI_SaveConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Config)) + }) + return _c +} + +func (_c *MockAPI_SaveConfig_Call) Return(_a0 *model.AppError) *MockAPI_SaveConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SaveConfig_Call) RunAndReturn(run func(*model.Config) *model.AppError) *MockAPI_SaveConfig_Call { + _c.Call.Return(run) + return _c +} + +// SavePluginConfig provides a mock function with given fields: config +func (_m *MockAPI) SavePluginConfig(config map[string]interface{}) *model.AppError { + ret := _m.Called(config) + + if len(ret) == 0 { + panic("no return value specified for SavePluginConfig") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(map[string]interface{}) *model.AppError); ok { + r0 = rf(config) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SavePluginConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SavePluginConfig' +type MockAPI_SavePluginConfig_Call struct { + *mock.Call +} + +// SavePluginConfig is a helper method to define mock.On call +// - config map[string]interface{} +func (_e *MockAPI_Expecter) SavePluginConfig(config interface{}) *MockAPI_SavePluginConfig_Call { + return &MockAPI_SavePluginConfig_Call{Call: _e.mock.On("SavePluginConfig", config)} +} + +func (_c *MockAPI_SavePluginConfig_Call) Run(run func(config map[string]interface{})) *MockAPI_SavePluginConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(map[string]interface{})) + }) + return _c +} + +func (_c *MockAPI_SavePluginConfig_Call) Return(_a0 *model.AppError) *MockAPI_SavePluginConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SavePluginConfig_Call) RunAndReturn(run func(map[string]interface{}) *model.AppError) *MockAPI_SavePluginConfig_Call { + _c.Call.Return(run) + return _c +} + +// SearchChannels provides a mock function with given fields: teamID, term +func (_m *MockAPI) SearchChannels(teamID string, term string) ([]*model.Channel, *model.AppError) { + ret := _m.Called(teamID, term) + + if len(ret) == 0 { + panic("no return value specified for SearchChannels") + } + + var r0 []*model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) ([]*model.Channel, *model.AppError)); ok { + return rf(teamID, term) + } + if rf, ok := ret.Get(0).(func(string, string) []*model.Channel); ok { + r0 = rf(teamID, term) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(teamID, term) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SearchChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchChannels' +type MockAPI_SearchChannels_Call struct { + *mock.Call +} + +// SearchChannels is a helper method to define mock.On call +// - teamID string +// - term string +func (_e *MockAPI_Expecter) SearchChannels(teamID interface{}, term interface{}) *MockAPI_SearchChannels_Call { + return &MockAPI_SearchChannels_Call{Call: _e.mock.On("SearchChannels", teamID, term)} +} + +func (_c *MockAPI_SearchChannels_Call) Run(run func(teamID string, term string)) *MockAPI_SearchChannels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_SearchChannels_Call) Return(_a0 []*model.Channel, _a1 *model.AppError) *MockAPI_SearchChannels_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SearchChannels_Call) RunAndReturn(run func(string, string) ([]*model.Channel, *model.AppError)) *MockAPI_SearchChannels_Call { + _c.Call.Return(run) + return _c +} + +// SearchPostsInTeam provides a mock function with given fields: teamID, paramsList +func (_m *MockAPI) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError) { + ret := _m.Called(teamID, paramsList) + + if len(ret) == 0 { + panic("no return value specified for SearchPostsInTeam") + } + + var r0 []*model.Post + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, []*model.SearchParams) ([]*model.Post, *model.AppError)); ok { + return rf(teamID, paramsList) + } + if rf, ok := ret.Get(0).(func(string, []*model.SearchParams) []*model.Post); ok { + r0 = rf(teamID, paramsList) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Post) + } + } + + if rf, ok := ret.Get(1).(func(string, []*model.SearchParams) *model.AppError); ok { + r1 = rf(teamID, paramsList) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SearchPostsInTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchPostsInTeam' +type MockAPI_SearchPostsInTeam_Call struct { + *mock.Call +} + +// SearchPostsInTeam is a helper method to define mock.On call +// - teamID string +// - paramsList []*model.SearchParams +func (_e *MockAPI_Expecter) SearchPostsInTeam(teamID interface{}, paramsList interface{}) *MockAPI_SearchPostsInTeam_Call { + return &MockAPI_SearchPostsInTeam_Call{Call: _e.mock.On("SearchPostsInTeam", teamID, paramsList)} +} + +func (_c *MockAPI_SearchPostsInTeam_Call) Run(run func(teamID string, paramsList []*model.SearchParams)) *MockAPI_SearchPostsInTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]*model.SearchParams)) + }) + return _c +} + +func (_c *MockAPI_SearchPostsInTeam_Call) Return(_a0 []*model.Post, _a1 *model.AppError) *MockAPI_SearchPostsInTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SearchPostsInTeam_Call) RunAndReturn(run func(string, []*model.SearchParams) ([]*model.Post, *model.AppError)) *MockAPI_SearchPostsInTeam_Call { + _c.Call.Return(run) + return _c +} + +// SearchPostsInTeamForUser provides a mock function with given fields: teamID, userID, searchParams +func (_m *MockAPI) SearchPostsInTeamForUser(teamID string, userID string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError) { + ret := _m.Called(teamID, userID, searchParams) + + if len(ret) == 0 { + panic("no return value specified for SearchPostsInTeamForUser") + } + + var r0 *model.PostSearchResults + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, model.SearchParameter) (*model.PostSearchResults, *model.AppError)); ok { + return rf(teamID, userID, searchParams) + } + if rf, ok := ret.Get(0).(func(string, string, model.SearchParameter) *model.PostSearchResults); ok { + r0 = rf(teamID, userID, searchParams) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostSearchResults) + } + } + + if rf, ok := ret.Get(1).(func(string, string, model.SearchParameter) *model.AppError); ok { + r1 = rf(teamID, userID, searchParams) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SearchPostsInTeamForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchPostsInTeamForUser' +type MockAPI_SearchPostsInTeamForUser_Call struct { + *mock.Call +} + +// SearchPostsInTeamForUser is a helper method to define mock.On call +// - teamID string +// - userID string +// - searchParams model.SearchParameter +func (_e *MockAPI_Expecter) SearchPostsInTeamForUser(teamID interface{}, userID interface{}, searchParams interface{}) *MockAPI_SearchPostsInTeamForUser_Call { + return &MockAPI_SearchPostsInTeamForUser_Call{Call: _e.mock.On("SearchPostsInTeamForUser", teamID, userID, searchParams)} +} + +func (_c *MockAPI_SearchPostsInTeamForUser_Call) Run(run func(teamID string, userID string, searchParams model.SearchParameter)) *MockAPI_SearchPostsInTeamForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(model.SearchParameter)) + }) + return _c +} + +func (_c *MockAPI_SearchPostsInTeamForUser_Call) Return(_a0 *model.PostSearchResults, _a1 *model.AppError) *MockAPI_SearchPostsInTeamForUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SearchPostsInTeamForUser_Call) RunAndReturn(run func(string, string, model.SearchParameter) (*model.PostSearchResults, *model.AppError)) *MockAPI_SearchPostsInTeamForUser_Call { + _c.Call.Return(run) + return _c +} + +// SearchTeams provides a mock function with given fields: term +func (_m *MockAPI) SearchTeams(term string) ([]*model.Team, *model.AppError) { + ret := _m.Called(term) + + if len(ret) == 0 { + panic("no return value specified for SearchTeams") + } + + var r0 []*model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string) ([]*model.Team, *model.AppError)); ok { + return rf(term) + } + if rf, ok := ret.Get(0).(func(string) []*model.Team); ok { + r0 = rf(term) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(term) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SearchTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchTeams' +type MockAPI_SearchTeams_Call struct { + *mock.Call +} + +// SearchTeams is a helper method to define mock.On call +// - term string +func (_e *MockAPI_Expecter) SearchTeams(term interface{}) *MockAPI_SearchTeams_Call { + return &MockAPI_SearchTeams_Call{Call: _e.mock.On("SearchTeams", term)} +} + +func (_c *MockAPI_SearchTeams_Call) Run(run func(term string)) *MockAPI_SearchTeams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_SearchTeams_Call) Return(_a0 []*model.Team, _a1 *model.AppError) *MockAPI_SearchTeams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SearchTeams_Call) RunAndReturn(run func(string) ([]*model.Team, *model.AppError)) *MockAPI_SearchTeams_Call { + _c.Call.Return(run) + return _c +} + +// SearchUsers provides a mock function with given fields: search +func (_m *MockAPI) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) { + ret := _m.Called(search) + + if len(ret) == 0 { + panic("no return value specified for SearchUsers") + } + + var r0 []*model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.UserSearch) ([]*model.User, *model.AppError)); ok { + return rf(search) + } + if rf, ok := ret.Get(0).(func(*model.UserSearch) []*model.User); ok { + r0 = rf(search) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + if rf, ok := ret.Get(1).(func(*model.UserSearch) *model.AppError); ok { + r1 = rf(search) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SearchUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchUsers' +type MockAPI_SearchUsers_Call struct { + *mock.Call +} + +// SearchUsers is a helper method to define mock.On call +// - search *model.UserSearch +func (_e *MockAPI_Expecter) SearchUsers(search interface{}) *MockAPI_SearchUsers_Call { + return &MockAPI_SearchUsers_Call{Call: _e.mock.On("SearchUsers", search)} +} + +func (_c *MockAPI_SearchUsers_Call) Run(run func(search *model.UserSearch)) *MockAPI_SearchUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.UserSearch)) + }) + return _c +} + +func (_c *MockAPI_SearchUsers_Call) Return(_a0 []*model.User, _a1 *model.AppError) *MockAPI_SearchUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SearchUsers_Call) RunAndReturn(run func(*model.UserSearch) ([]*model.User, *model.AppError)) *MockAPI_SearchUsers_Call { + _c.Call.Return(run) + return _c +} + +// SendEphemeralPost provides a mock function with given fields: userID, post +func (_m *MockAPI) SendEphemeralPost(userID string, post *model.Post) *model.Post { + ret := _m.Called(userID, post) + + if len(ret) == 0 { + panic("no return value specified for SendEphemeralPost") + } + + var r0 *model.Post + if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { + r0 = rf(userID, post) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Post) + } + } + + return r0 +} + +// MockAPI_SendEphemeralPost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEphemeralPost' +type MockAPI_SendEphemeralPost_Call struct { + *mock.Call +} + +// SendEphemeralPost is a helper method to define mock.On call +// - userID string +// - post *model.Post +func (_e *MockAPI_Expecter) SendEphemeralPost(userID interface{}, post interface{}) *MockAPI_SendEphemeralPost_Call { + return &MockAPI_SendEphemeralPost_Call{Call: _e.mock.On("SendEphemeralPost", userID, post)} +} + +func (_c *MockAPI_SendEphemeralPost_Call) Run(run func(userID string, post *model.Post)) *MockAPI_SendEphemeralPost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.Post)) + }) + return _c +} + +func (_c *MockAPI_SendEphemeralPost_Call) Return(_a0 *model.Post) *MockAPI_SendEphemeralPost_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SendEphemeralPost_Call) RunAndReturn(run func(string, *model.Post) *model.Post) *MockAPI_SendEphemeralPost_Call { + _c.Call.Return(run) + return _c +} + +// SendMail provides a mock function with given fields: to, subject, htmlBody +func (_m *MockAPI) SendMail(to string, subject string, htmlBody string) *model.AppError { + ret := _m.Called(to, subject, htmlBody) + + if len(ret) == 0 { + panic("no return value specified for SendMail") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { + r0 = rf(to, subject, htmlBody) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SendMail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMail' +type MockAPI_SendMail_Call struct { + *mock.Call +} + +// SendMail is a helper method to define mock.On call +// - to string +// - subject string +// - htmlBody string +func (_e *MockAPI_Expecter) SendMail(to interface{}, subject interface{}, htmlBody interface{}) *MockAPI_SendMail_Call { + return &MockAPI_SendMail_Call{Call: _e.mock.On("SendMail", to, subject, htmlBody)} +} + +func (_c *MockAPI_SendMail_Call) Run(run func(to string, subject string, htmlBody string)) *MockAPI_SendMail_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_SendMail_Call) Return(_a0 *model.AppError) *MockAPI_SendMail_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SendMail_Call) RunAndReturn(run func(string, string, string) *model.AppError) *MockAPI_SendMail_Call { + _c.Call.Return(run) + return _c +} + +// SendPushNotification provides a mock function with given fields: notification, userID +func (_m *MockAPI) SendPushNotification(notification *model.PushNotification, userID string) *model.AppError { + ret := _m.Called(notification, userID) + + if len(ret) == 0 { + panic("no return value specified for SendPushNotification") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(*model.PushNotification, string) *model.AppError); ok { + r0 = rf(notification, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SendPushNotification_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendPushNotification' +type MockAPI_SendPushNotification_Call struct { + *mock.Call +} + +// SendPushNotification is a helper method to define mock.On call +// - notification *model.PushNotification +// - userID string +func (_e *MockAPI_Expecter) SendPushNotification(notification interface{}, userID interface{}) *MockAPI_SendPushNotification_Call { + return &MockAPI_SendPushNotification_Call{Call: _e.mock.On("SendPushNotification", notification, userID)} +} + +func (_c *MockAPI_SendPushNotification_Call) Run(run func(notification *model.PushNotification, userID string)) *MockAPI_SendPushNotification_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.PushNotification), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_SendPushNotification_Call) Return(_a0 *model.AppError) *MockAPI_SendPushNotification_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SendPushNotification_Call) RunAndReturn(run func(*model.PushNotification, string) *model.AppError) *MockAPI_SendPushNotification_Call { + _c.Call.Return(run) + return _c +} + +// SetFileSearchableContent provides a mock function with given fields: fileID, content +func (_m *MockAPI) SetFileSearchableContent(fileID string, content string) *model.AppError { + ret := _m.Called(fileID, content) + + if len(ret) == 0 { + panic("no return value specified for SetFileSearchableContent") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { + r0 = rf(fileID, content) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SetFileSearchableContent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFileSearchableContent' +type MockAPI_SetFileSearchableContent_Call struct { + *mock.Call +} + +// SetFileSearchableContent is a helper method to define mock.On call +// - fileID string +// - content string +func (_e *MockAPI_Expecter) SetFileSearchableContent(fileID interface{}, content interface{}) *MockAPI_SetFileSearchableContent_Call { + return &MockAPI_SetFileSearchableContent_Call{Call: _e.mock.On("SetFileSearchableContent", fileID, content)} +} + +func (_c *MockAPI_SetFileSearchableContent_Call) Run(run func(fileID string, content string)) *MockAPI_SetFileSearchableContent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_SetFileSearchableContent_Call) Return(_a0 *model.AppError) *MockAPI_SetFileSearchableContent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SetFileSearchableContent_Call) RunAndReturn(run func(string, string) *model.AppError) *MockAPI_SetFileSearchableContent_Call { + _c.Call.Return(run) + return _c +} + +// SetProfileImage provides a mock function with given fields: userID, data +func (_m *MockAPI) SetProfileImage(userID string, data []byte) *model.AppError { + ret := _m.Called(userID, data) + + if len(ret) == 0 { + panic("no return value specified for SetProfileImage") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { + r0 = rf(userID, data) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SetProfileImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetProfileImage' +type MockAPI_SetProfileImage_Call struct { + *mock.Call +} + +// SetProfileImage is a helper method to define mock.On call +// - userID string +// - data []byte +func (_e *MockAPI_Expecter) SetProfileImage(userID interface{}, data interface{}) *MockAPI_SetProfileImage_Call { + return &MockAPI_SetProfileImage_Call{Call: _e.mock.On("SetProfileImage", userID, data)} +} + +func (_c *MockAPI_SetProfileImage_Call) Run(run func(userID string, data []byte)) *MockAPI_SetProfileImage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte)) + }) + return _c +} + +func (_c *MockAPI_SetProfileImage_Call) Return(_a0 *model.AppError) *MockAPI_SetProfileImage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SetProfileImage_Call) RunAndReturn(run func(string, []byte) *model.AppError) *MockAPI_SetProfileImage_Call { + _c.Call.Return(run) + return _c +} + +// SetTeamIcon provides a mock function with given fields: teamID, data +func (_m *MockAPI) SetTeamIcon(teamID string, data []byte) *model.AppError { + ret := _m.Called(teamID, data) + + if len(ret) == 0 { + panic("no return value specified for SetTeamIcon") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { + r0 = rf(teamID, data) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_SetTeamIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTeamIcon' +type MockAPI_SetTeamIcon_Call struct { + *mock.Call +} + +// SetTeamIcon is a helper method to define mock.On call +// - teamID string +// - data []byte +func (_e *MockAPI_Expecter) SetTeamIcon(teamID interface{}, data interface{}) *MockAPI_SetTeamIcon_Call { + return &MockAPI_SetTeamIcon_Call{Call: _e.mock.On("SetTeamIcon", teamID, data)} +} + +func (_c *MockAPI_SetTeamIcon_Call) Run(run func(teamID string, data []byte)) *MockAPI_SetTeamIcon_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte)) + }) + return _c +} + +func (_c *MockAPI_SetTeamIcon_Call) Return(_a0 *model.AppError) *MockAPI_SetTeamIcon_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SetTeamIcon_Call) RunAndReturn(run func(string, []byte) *model.AppError) *MockAPI_SetTeamIcon_Call { + _c.Call.Return(run) + return _c +} + +// SetUserStatusTimedDND provides a mock function with given fields: userId, endtime +func (_m *MockAPI) SetUserStatusTimedDND(userId string, endtime int64) (*model.Status, *model.AppError) { + ret := _m.Called(userId, endtime) + + if len(ret) == 0 { + panic("no return value specified for SetUserStatusTimedDND") + } + + var r0 *model.Status + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, int64) (*model.Status, *model.AppError)); ok { + return rf(userId, endtime) + } + if rf, ok := ret.Get(0).(func(string, int64) *model.Status); ok { + r0 = rf(userId, endtime) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Status) + } + } + + if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok { + r1 = rf(userId, endtime) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_SetUserStatusTimedDND_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUserStatusTimedDND' +type MockAPI_SetUserStatusTimedDND_Call struct { + *mock.Call +} + +// SetUserStatusTimedDND is a helper method to define mock.On call +// - userId string +// - endtime int64 +func (_e *MockAPI_Expecter) SetUserStatusTimedDND(userId interface{}, endtime interface{}) *MockAPI_SetUserStatusTimedDND_Call { + return &MockAPI_SetUserStatusTimedDND_Call{Call: _e.mock.On("SetUserStatusTimedDND", userId, endtime)} +} + +func (_c *MockAPI_SetUserStatusTimedDND_Call) Run(run func(userId string, endtime int64)) *MockAPI_SetUserStatusTimedDND_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int64)) + }) + return _c +} + +func (_c *MockAPI_SetUserStatusTimedDND_Call) Return(_a0 *model.Status, _a1 *model.AppError) *MockAPI_SetUserStatusTimedDND_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_SetUserStatusTimedDND_Call) RunAndReturn(run func(string, int64) (*model.Status, *model.AppError)) *MockAPI_SetUserStatusTimedDND_Call { + _c.Call.Return(run) + return _c +} + +// ShareChannel provides a mock function with given fields: sc +func (_m *MockAPI) ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error) { + ret := _m.Called(sc) + + if len(ret) == 0 { + panic("no return value specified for ShareChannel") + } + + var r0 *model.SharedChannel + var r1 error + if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { + return rf(sc) + } + if rf, ok := ret.Get(0).(func(*model.SharedChannel) *model.SharedChannel); ok { + r0 = rf(sc) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.SharedChannel) + } + } + + if rf, ok := ret.Get(1).(func(*model.SharedChannel) error); ok { + r1 = rf(sc) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_ShareChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShareChannel' +type MockAPI_ShareChannel_Call struct { + *mock.Call +} + +// ShareChannel is a helper method to define mock.On call +// - sc *model.SharedChannel +func (_e *MockAPI_Expecter) ShareChannel(sc interface{}) *MockAPI_ShareChannel_Call { + return &MockAPI_ShareChannel_Call{Call: _e.mock.On("ShareChannel", sc)} +} + +func (_c *MockAPI_ShareChannel_Call) Run(run func(sc *model.SharedChannel)) *MockAPI_ShareChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.SharedChannel)) + }) + return _c +} + +func (_c *MockAPI_ShareChannel_Call) Return(_a0 *model.SharedChannel, _a1 error) *MockAPI_ShareChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_ShareChannel_Call) RunAndReturn(run func(*model.SharedChannel) (*model.SharedChannel, error)) *MockAPI_ShareChannel_Call { + _c.Call.Return(run) + return _c +} + +// SyncSharedChannel provides a mock function with given fields: channelID +func (_m *MockAPI) SyncSharedChannel(channelID string) error { + ret := _m.Called(channelID) + + if len(ret) == 0 { + panic("no return value specified for SyncSharedChannel") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(channelID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_SyncSharedChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncSharedChannel' +type MockAPI_SyncSharedChannel_Call struct { + *mock.Call +} + +// SyncSharedChannel is a helper method to define mock.On call +// - channelID string +func (_e *MockAPI_Expecter) SyncSharedChannel(channelID interface{}) *MockAPI_SyncSharedChannel_Call { + return &MockAPI_SyncSharedChannel_Call{Call: _e.mock.On("SyncSharedChannel", channelID)} +} + +func (_c *MockAPI_SyncSharedChannel_Call) Run(run func(channelID string)) *MockAPI_SyncSharedChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_SyncSharedChannel_Call) Return(_a0 error) *MockAPI_SyncSharedChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_SyncSharedChannel_Call) RunAndReturn(run func(string) error) *MockAPI_SyncSharedChannel_Call { + _c.Call.Return(run) + return _c +} + +// UninviteRemoteFromChannel provides a mock function with given fields: channelID, remoteID +func (_m *MockAPI) UninviteRemoteFromChannel(channelID string, remoteID string) error { + ret := _m.Called(channelID, remoteID) + + if len(ret) == 0 { + panic("no return value specified for UninviteRemoteFromChannel") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(channelID, remoteID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_UninviteRemoteFromChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UninviteRemoteFromChannel' +type MockAPI_UninviteRemoteFromChannel_Call struct { + *mock.Call +} + +// UninviteRemoteFromChannel is a helper method to define mock.On call +// - channelID string +// - remoteID string +func (_e *MockAPI_Expecter) UninviteRemoteFromChannel(channelID interface{}, remoteID interface{}) *MockAPI_UninviteRemoteFromChannel_Call { + return &MockAPI_UninviteRemoteFromChannel_Call{Call: _e.mock.On("UninviteRemoteFromChannel", channelID, remoteID)} +} + +func (_c *MockAPI_UninviteRemoteFromChannel_Call) Run(run func(channelID string, remoteID string)) *MockAPI_UninviteRemoteFromChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_UninviteRemoteFromChannel_Call) Return(_a0 error) *MockAPI_UninviteRemoteFromChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UninviteRemoteFromChannel_Call) RunAndReturn(run func(string, string) error) *MockAPI_UninviteRemoteFromChannel_Call { + _c.Call.Return(run) + return _c +} + +// UnregisterCommand provides a mock function with given fields: teamID, trigger +func (_m *MockAPI) UnregisterCommand(teamID string, trigger string) error { + ret := _m.Called(teamID, trigger) + + if len(ret) == 0 { + panic("no return value specified for UnregisterCommand") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(teamID, trigger) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_UnregisterCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnregisterCommand' +type MockAPI_UnregisterCommand_Call struct { + *mock.Call +} + +// UnregisterCommand is a helper method to define mock.On call +// - teamID string +// - trigger string +func (_e *MockAPI_Expecter) UnregisterCommand(teamID interface{}, trigger interface{}) *MockAPI_UnregisterCommand_Call { + return &MockAPI_UnregisterCommand_Call{Call: _e.mock.On("UnregisterCommand", teamID, trigger)} +} + +func (_c *MockAPI_UnregisterCommand_Call) Run(run func(teamID string, trigger string)) *MockAPI_UnregisterCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_UnregisterCommand_Call) Return(_a0 error) *MockAPI_UnregisterCommand_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UnregisterCommand_Call) RunAndReturn(run func(string, string) error) *MockAPI_UnregisterCommand_Call { + _c.Call.Return(run) + return _c +} + +// UnregisterPluginForSharedChannels provides a mock function with given fields: pluginID +func (_m *MockAPI) UnregisterPluginForSharedChannels(pluginID string) error { + ret := _m.Called(pluginID) + + if len(ret) == 0 { + panic("no return value specified for UnregisterPluginForSharedChannels") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(pluginID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_UnregisterPluginForSharedChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnregisterPluginForSharedChannels' +type MockAPI_UnregisterPluginForSharedChannels_Call struct { + *mock.Call +} + +// UnregisterPluginForSharedChannels is a helper method to define mock.On call +// - pluginID string +func (_e *MockAPI_Expecter) UnregisterPluginForSharedChannels(pluginID interface{}) *MockAPI_UnregisterPluginForSharedChannels_Call { + return &MockAPI_UnregisterPluginForSharedChannels_Call{Call: _e.mock.On("UnregisterPluginForSharedChannels", pluginID)} +} + +func (_c *MockAPI_UnregisterPluginForSharedChannels_Call) Run(run func(pluginID string)) *MockAPI_UnregisterPluginForSharedChannels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_UnregisterPluginForSharedChannels_Call) Return(_a0 error) *MockAPI_UnregisterPluginForSharedChannels_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UnregisterPluginForSharedChannels_Call) RunAndReturn(run func(string) error) *MockAPI_UnregisterPluginForSharedChannels_Call { + _c.Call.Return(run) + return _c +} + +// UnshareChannel provides a mock function with given fields: channelID +func (_m *MockAPI) UnshareChannel(channelID string) (bool, error) { + ret := _m.Called(channelID) + + if len(ret) == 0 { + panic("no return value specified for UnshareChannel") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { + return rf(channelID) + } + if rf, ok := ret.Get(0).(func(string) bool); ok { + r0 = rf(channelID) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(channelID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_UnshareChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnshareChannel' +type MockAPI_UnshareChannel_Call struct { + *mock.Call +} + +// UnshareChannel is a helper method to define mock.On call +// - channelID string +func (_e *MockAPI_Expecter) UnshareChannel(channelID interface{}) *MockAPI_UnshareChannel_Call { + return &MockAPI_UnshareChannel_Call{Call: _e.mock.On("UnshareChannel", channelID)} +} + +func (_c *MockAPI_UnshareChannel_Call) Run(run func(channelID string)) *MockAPI_UnshareChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockAPI_UnshareChannel_Call) Return(unshared bool, err error) *MockAPI_UnshareChannel_Call { + _c.Call.Return(unshared, err) + return _c +} + +func (_c *MockAPI_UnshareChannel_Call) RunAndReturn(run func(string) (bool, error)) *MockAPI_UnshareChannel_Call { + _c.Call.Return(run) + return _c +} + +// UpdateBotActive provides a mock function with given fields: botUserId, active +func (_m *MockAPI) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError) { + ret := _m.Called(botUserId, active) + + if len(ret) == 0 { + panic("no return value specified for UpdateBotActive") + } + + var r0 *model.Bot + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, *model.AppError)); ok { + return rf(botUserId, active) + } + if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok { + r0 = rf(botUserId, active) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Bot) + } + } + + if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { + r1 = rf(botUserId, active) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateBotActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBotActive' +type MockAPI_UpdateBotActive_Call struct { + *mock.Call +} + +// UpdateBotActive is a helper method to define mock.On call +// - botUserId string +// - active bool +func (_e *MockAPI_Expecter) UpdateBotActive(botUserId interface{}, active interface{}) *MockAPI_UpdateBotActive_Call { + return &MockAPI_UpdateBotActive_Call{Call: _e.mock.On("UpdateBotActive", botUserId, active)} +} + +func (_c *MockAPI_UpdateBotActive_Call) Run(run func(botUserId string, active bool)) *MockAPI_UpdateBotActive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *MockAPI_UpdateBotActive_Call) Return(_a0 *model.Bot, _a1 *model.AppError) *MockAPI_UpdateBotActive_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateBotActive_Call) RunAndReturn(run func(string, bool) (*model.Bot, *model.AppError)) *MockAPI_UpdateBotActive_Call { + _c.Call.Return(run) + return _c +} + +// UpdateChannel provides a mock function with given fields: channel +func (_m *MockAPI) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { + ret := _m.Called(channel) + + if len(ret) == 0 { + panic("no return value specified for UpdateChannel") + } + + var r0 *model.Channel + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Channel) (*model.Channel, *model.AppError)); ok { + return rf(channel) + } + if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { + r0 = rf(channel) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Channel) + } + } + + if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok { + r1 = rf(channel) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannel' +type MockAPI_UpdateChannel_Call struct { + *mock.Call +} + +// UpdateChannel is a helper method to define mock.On call +// - channel *model.Channel +func (_e *MockAPI_Expecter) UpdateChannel(channel interface{}) *MockAPI_UpdateChannel_Call { + return &MockAPI_UpdateChannel_Call{Call: _e.mock.On("UpdateChannel", channel)} +} + +func (_c *MockAPI_UpdateChannel_Call) Run(run func(channel *model.Channel)) *MockAPI_UpdateChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Channel)) + }) + return _c +} + +func (_c *MockAPI_UpdateChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_UpdateChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateChannel_Call) RunAndReturn(run func(*model.Channel) (*model.Channel, *model.AppError)) *MockAPI_UpdateChannel_Call { + _c.Call.Return(run) + return _c +} + +// UpdateChannelMemberNotifications provides a mock function with given fields: channelId, userID, notifications +func (_m *MockAPI) UpdateChannelMemberNotifications(channelId string, userID string, notifications map[string]string) (*model.ChannelMember, *model.AppError) { + ret := _m.Called(channelId, userID, notifications) + + if len(ret) == 0 { + panic("no return value specified for UpdateChannelMemberNotifications") + } + + var r0 *model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, map[string]string) (*model.ChannelMember, *model.AppError)); ok { + return rf(channelId, userID, notifications) + } + if rf, ok := ret.Get(0).(func(string, string, map[string]string) *model.ChannelMember); ok { + r0 = rf(channelId, userID, notifications) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string, map[string]string) *model.AppError); ok { + r1 = rf(channelId, userID, notifications) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateChannelMemberNotifications_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelMemberNotifications' +type MockAPI_UpdateChannelMemberNotifications_Call struct { + *mock.Call +} + +// UpdateChannelMemberNotifications is a helper method to define mock.On call +// - channelId string +// - userID string +// - notifications map[string]string +func (_e *MockAPI_Expecter) UpdateChannelMemberNotifications(channelId interface{}, userID interface{}, notifications interface{}) *MockAPI_UpdateChannelMemberNotifications_Call { + return &MockAPI_UpdateChannelMemberNotifications_Call{Call: _e.mock.On("UpdateChannelMemberNotifications", channelId, userID, notifications)} +} + +func (_c *MockAPI_UpdateChannelMemberNotifications_Call) Run(run func(channelId string, userID string, notifications map[string]string)) *MockAPI_UpdateChannelMemberNotifications_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(map[string]string)) + }) + return _c +} + +func (_c *MockAPI_UpdateChannelMemberNotifications_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_UpdateChannelMemberNotifications_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateChannelMemberNotifications_Call) RunAndReturn(run func(string, string, map[string]string) (*model.ChannelMember, *model.AppError)) *MockAPI_UpdateChannelMemberNotifications_Call { + _c.Call.Return(run) + return _c +} + +// UpdateChannelMemberRoles provides a mock function with given fields: channelId, userID, newRoles +func (_m *MockAPI) UpdateChannelMemberRoles(channelId string, userID string, newRoles string) (*model.ChannelMember, *model.AppError) { + ret := _m.Called(channelId, userID, newRoles) + + if len(ret) == 0 { + panic("no return value specified for UpdateChannelMemberRoles") + } + + var r0 *model.ChannelMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) (*model.ChannelMember, *model.AppError)); ok { + return rf(channelId, userID, newRoles) + } + if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelMember); ok { + r0 = rf(channelId, userID, newRoles) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ChannelMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { + r1 = rf(channelId, userID, newRoles) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateChannelMemberRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelMemberRoles' +type MockAPI_UpdateChannelMemberRoles_Call struct { + *mock.Call +} + +// UpdateChannelMemberRoles is a helper method to define mock.On call +// - channelId string +// - userID string +// - newRoles string +func (_e *MockAPI_Expecter) UpdateChannelMemberRoles(channelId interface{}, userID interface{}, newRoles interface{}) *MockAPI_UpdateChannelMemberRoles_Call { + return &MockAPI_UpdateChannelMemberRoles_Call{Call: _e.mock.On("UpdateChannelMemberRoles", channelId, userID, newRoles)} +} + +func (_c *MockAPI_UpdateChannelMemberRoles_Call) Run(run func(channelId string, userID string, newRoles string)) *MockAPI_UpdateChannelMemberRoles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_UpdateChannelMemberRoles_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_UpdateChannelMemberRoles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateChannelMemberRoles_Call) RunAndReturn(run func(string, string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_UpdateChannelMemberRoles_Call { + _c.Call.Return(run) + return _c +} + +// UpdateChannelSidebarCategories provides a mock function with given fields: userID, teamID, categories +func (_m *MockAPI) UpdateChannelSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) { + ret := _m.Called(userID, teamID, categories) + + if len(ret) == 0 { + panic("no return value specified for UpdateChannelSidebarCategories") + } + + var r0 []*model.SidebarCategoryWithChannels + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError)); ok { + return rf(userID, teamID, categories) + } + if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok { + r0 = rf(userID, teamID, categories) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels) + } + } + + if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) *model.AppError); ok { + r1 = rf(userID, teamID, categories) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateChannelSidebarCategories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelSidebarCategories' +type MockAPI_UpdateChannelSidebarCategories_Call struct { + *mock.Call +} + +// UpdateChannelSidebarCategories is a helper method to define mock.On call +// - userID string +// - teamID string +// - categories []*model.SidebarCategoryWithChannels +func (_e *MockAPI_Expecter) UpdateChannelSidebarCategories(userID interface{}, teamID interface{}, categories interface{}) *MockAPI_UpdateChannelSidebarCategories_Call { + return &MockAPI_UpdateChannelSidebarCategories_Call{Call: _e.mock.On("UpdateChannelSidebarCategories", userID, teamID, categories)} +} + +func (_c *MockAPI_UpdateChannelSidebarCategories_Call) Run(run func(userID string, teamID string, categories []*model.SidebarCategoryWithChannels)) *MockAPI_UpdateChannelSidebarCategories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].([]*model.SidebarCategoryWithChannels)) + }) + return _c +} + +func (_c *MockAPI_UpdateChannelSidebarCategories_Call) Return(_a0 []*model.SidebarCategoryWithChannels, _a1 *model.AppError) *MockAPI_UpdateChannelSidebarCategories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateChannelSidebarCategories_Call) RunAndReturn(run func(string, string, []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError)) *MockAPI_UpdateChannelSidebarCategories_Call { + _c.Call.Return(run) + return _c +} + +// UpdateCommand provides a mock function with given fields: commandID, updatedCmd +func (_m *MockAPI) UpdateCommand(commandID string, updatedCmd *model.Command) (*model.Command, error) { + ret := _m.Called(commandID, updatedCmd) + + if len(ret) == 0 { + panic("no return value specified for UpdateCommand") + } + + var r0 *model.Command + var r1 error + if rf, ok := ret.Get(0).(func(string, *model.Command) (*model.Command, error)); ok { + return rf(commandID, updatedCmd) + } + if rf, ok := ret.Get(0).(func(string, *model.Command) *model.Command); ok { + r0 = rf(commandID, updatedCmd) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Command) + } + } + + if rf, ok := ret.Get(1).(func(string, *model.Command) error); ok { + r1 = rf(commandID, updatedCmd) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_UpdateCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCommand' +type MockAPI_UpdateCommand_Call struct { + *mock.Call +} + +// UpdateCommand is a helper method to define mock.On call +// - commandID string +// - updatedCmd *model.Command +func (_e *MockAPI_Expecter) UpdateCommand(commandID interface{}, updatedCmd interface{}) *MockAPI_UpdateCommand_Call { + return &MockAPI_UpdateCommand_Call{Call: _e.mock.On("UpdateCommand", commandID, updatedCmd)} +} + +func (_c *MockAPI_UpdateCommand_Call) Run(run func(commandID string, updatedCmd *model.Command)) *MockAPI_UpdateCommand_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.Command)) + }) + return _c +} + +func (_c *MockAPI_UpdateCommand_Call) Return(_a0 *model.Command, _a1 error) *MockAPI_UpdateCommand_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateCommand_Call) RunAndReturn(run func(string, *model.Command) (*model.Command, error)) *MockAPI_UpdateCommand_Call { + _c.Call.Return(run) + return _c +} + +// UpdateEphemeralPost provides a mock function with given fields: userID, post +func (_m *MockAPI) UpdateEphemeralPost(userID string, post *model.Post) *model.Post { + ret := _m.Called(userID, post) + + if len(ret) == 0 { + panic("no return value specified for UpdateEphemeralPost") + } + + var r0 *model.Post + if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { + r0 = rf(userID, post) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Post) + } + } + + return r0 +} + +// MockAPI_UpdateEphemeralPost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateEphemeralPost' +type MockAPI_UpdateEphemeralPost_Call struct { + *mock.Call +} + +// UpdateEphemeralPost is a helper method to define mock.On call +// - userID string +// - post *model.Post +func (_e *MockAPI_Expecter) UpdateEphemeralPost(userID interface{}, post interface{}) *MockAPI_UpdateEphemeralPost_Call { + return &MockAPI_UpdateEphemeralPost_Call{Call: _e.mock.On("UpdateEphemeralPost", userID, post)} +} + +func (_c *MockAPI_UpdateEphemeralPost_Call) Run(run func(userID string, post *model.Post)) *MockAPI_UpdateEphemeralPost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.Post)) + }) + return _c +} + +func (_c *MockAPI_UpdateEphemeralPost_Call) Return(_a0 *model.Post) *MockAPI_UpdateEphemeralPost_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UpdateEphemeralPost_Call) RunAndReturn(run func(string, *model.Post) *model.Post) *MockAPI_UpdateEphemeralPost_Call { + _c.Call.Return(run) + return _c +} + +// UpdateOAuthApp provides a mock function with given fields: app +func (_m *MockAPI) UpdateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) { + ret := _m.Called(app) + + if len(ret) == 0 { + panic("no return value specified for UpdateOAuthApp") + } + + var r0 *model.OAuthApp + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)); ok { + return rf(app) + } + if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok { + r0 = rf(app) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.OAuthApp) + } + } + + if rf, ok := ret.Get(1).(func(*model.OAuthApp) *model.AppError); ok { + r1 = rf(app) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateOAuthApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateOAuthApp' +type MockAPI_UpdateOAuthApp_Call struct { + *mock.Call +} + +// UpdateOAuthApp is a helper method to define mock.On call +// - app *model.OAuthApp +func (_e *MockAPI_Expecter) UpdateOAuthApp(app interface{}) *MockAPI_UpdateOAuthApp_Call { + return &MockAPI_UpdateOAuthApp_Call{Call: _e.mock.On("UpdateOAuthApp", app)} +} + +func (_c *MockAPI_UpdateOAuthApp_Call) Run(run func(app *model.OAuthApp)) *MockAPI_UpdateOAuthApp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.OAuthApp)) + }) + return _c +} + +func (_c *MockAPI_UpdateOAuthApp_Call) Return(_a0 *model.OAuthApp, _a1 *model.AppError) *MockAPI_UpdateOAuthApp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateOAuthApp_Call) RunAndReturn(run func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)) *MockAPI_UpdateOAuthApp_Call { + _c.Call.Return(run) + return _c +} + +// UpdatePost provides a mock function with given fields: post +func (_m *MockAPI) UpdatePost(post *model.Post) (*model.Post, *model.AppError) { + ret := _m.Called(post) + + if len(ret) == 0 { + panic("no return value specified for UpdatePost") + } + + var r0 *model.Post + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok { + return rf(post) + } + if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { + r0 = rf(post) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Post) + } + } + + if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok { + r1 = rf(post) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdatePost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePost' +type MockAPI_UpdatePost_Call struct { + *mock.Call +} + +// UpdatePost is a helper method to define mock.On call +// - post *model.Post +func (_e *MockAPI_Expecter) UpdatePost(post interface{}) *MockAPI_UpdatePost_Call { + return &MockAPI_UpdatePost_Call{Call: _e.mock.On("UpdatePost", post)} +} + +func (_c *MockAPI_UpdatePost_Call) Run(run func(post *model.Post)) *MockAPI_UpdatePost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Post)) + }) + return _c +} + +func (_c *MockAPI_UpdatePost_Call) Return(_a0 *model.Post, _a1 *model.AppError) *MockAPI_UpdatePost_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdatePost_Call) RunAndReturn(run func(*model.Post) (*model.Post, *model.AppError)) *MockAPI_UpdatePost_Call { + _c.Call.Return(run) + return _c +} + +// UpdatePreferencesForUser provides a mock function with given fields: userID, preferences +func (_m *MockAPI) UpdatePreferencesForUser(userID string, preferences []model.Preference) *model.AppError { + ret := _m.Called(userID, preferences) + + if len(ret) == 0 { + panic("no return value specified for UpdatePreferencesForUser") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, []model.Preference) *model.AppError); ok { + r0 = rf(userID, preferences) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_UpdatePreferencesForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePreferencesForUser' +type MockAPI_UpdatePreferencesForUser_Call struct { + *mock.Call +} + +// UpdatePreferencesForUser is a helper method to define mock.On call +// - userID string +// - preferences []model.Preference +func (_e *MockAPI_Expecter) UpdatePreferencesForUser(userID interface{}, preferences interface{}) *MockAPI_UpdatePreferencesForUser_Call { + return &MockAPI_UpdatePreferencesForUser_Call{Call: _e.mock.On("UpdatePreferencesForUser", userID, preferences)} +} + +func (_c *MockAPI_UpdatePreferencesForUser_Call) Run(run func(userID string, preferences []model.Preference)) *MockAPI_UpdatePreferencesForUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]model.Preference)) + }) + return _c +} + +func (_c *MockAPI_UpdatePreferencesForUser_Call) Return(_a0 *model.AppError) *MockAPI_UpdatePreferencesForUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UpdatePreferencesForUser_Call) RunAndReturn(run func(string, []model.Preference) *model.AppError) *MockAPI_UpdatePreferencesForUser_Call { + _c.Call.Return(run) + return _c +} + +// UpdateSharedChannel provides a mock function with given fields: sc +func (_m *MockAPI) UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error) { + ret := _m.Called(sc) + + if len(ret) == 0 { + panic("no return value specified for UpdateSharedChannel") + } + + var r0 *model.SharedChannel + var r1 error + if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok { + return rf(sc) + } + if rf, ok := ret.Get(0).(func(*model.SharedChannel) *model.SharedChannel); ok { + r0 = rf(sc) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.SharedChannel) + } + } + + if rf, ok := ret.Get(1).(func(*model.SharedChannel) error); ok { + r1 = rf(sc) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_UpdateSharedChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSharedChannel' +type MockAPI_UpdateSharedChannel_Call struct { + *mock.Call +} + +// UpdateSharedChannel is a helper method to define mock.On call +// - sc *model.SharedChannel +func (_e *MockAPI_Expecter) UpdateSharedChannel(sc interface{}) *MockAPI_UpdateSharedChannel_Call { + return &MockAPI_UpdateSharedChannel_Call{Call: _e.mock.On("UpdateSharedChannel", sc)} +} + +func (_c *MockAPI_UpdateSharedChannel_Call) Run(run func(sc *model.SharedChannel)) *MockAPI_UpdateSharedChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.SharedChannel)) + }) + return _c +} + +func (_c *MockAPI_UpdateSharedChannel_Call) Return(_a0 *model.SharedChannel, _a1 error) *MockAPI_UpdateSharedChannel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateSharedChannel_Call) RunAndReturn(run func(*model.SharedChannel) (*model.SharedChannel, error)) *MockAPI_UpdateSharedChannel_Call { + _c.Call.Return(run) + return _c +} + +// UpdateSharedChannelCursor provides a mock function with given fields: channelID, remoteID, cusror +func (_m *MockAPI) UpdateSharedChannelCursor(channelID string, remoteID string, cusror model.GetPostsSinceForSyncCursor) error { + ret := _m.Called(channelID, remoteID, cusror) + + if len(ret) == 0 { + panic("no return value specified for UpdateSharedChannelCursor") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, model.GetPostsSinceForSyncCursor) error); ok { + r0 = rf(channelID, remoteID, cusror) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockAPI_UpdateSharedChannelCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSharedChannelCursor' +type MockAPI_UpdateSharedChannelCursor_Call struct { + *mock.Call +} + +// UpdateSharedChannelCursor is a helper method to define mock.On call +// - channelID string +// - remoteID string +// - cusror model.GetPostsSinceForSyncCursor +func (_e *MockAPI_Expecter) UpdateSharedChannelCursor(channelID interface{}, remoteID interface{}, cusror interface{}) *MockAPI_UpdateSharedChannelCursor_Call { + return &MockAPI_UpdateSharedChannelCursor_Call{Call: _e.mock.On("UpdateSharedChannelCursor", channelID, remoteID, cusror)} +} + +func (_c *MockAPI_UpdateSharedChannelCursor_Call) Run(run func(channelID string, remoteID string, cusror model.GetPostsSinceForSyncCursor)) *MockAPI_UpdateSharedChannelCursor_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(model.GetPostsSinceForSyncCursor)) + }) + return _c +} + +func (_c *MockAPI_UpdateSharedChannelCursor_Call) Return(_a0 error) *MockAPI_UpdateSharedChannelCursor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UpdateSharedChannelCursor_Call) RunAndReturn(run func(string, string, model.GetPostsSinceForSyncCursor) error) *MockAPI_UpdateSharedChannelCursor_Call { + _c.Call.Return(run) + return _c +} + +// UpdateTeam provides a mock function with given fields: team +func (_m *MockAPI) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) { + ret := _m.Called(team) + + if len(ret) == 0 { + panic("no return value specified for UpdateTeam") + } + + var r0 *model.Team + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, *model.AppError)); ok { + return rf(team) + } + if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok { + r0 = rf(team) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Team) + } + } + + if rf, ok := ret.Get(1).(func(*model.Team) *model.AppError); ok { + r1 = rf(team) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTeam' +type MockAPI_UpdateTeam_Call struct { + *mock.Call +} + +// UpdateTeam is a helper method to define mock.On call +// - team *model.Team +func (_e *MockAPI_Expecter) UpdateTeam(team interface{}) *MockAPI_UpdateTeam_Call { + return &MockAPI_UpdateTeam_Call{Call: _e.mock.On("UpdateTeam", team)} +} + +func (_c *MockAPI_UpdateTeam_Call) Run(run func(team *model.Team)) *MockAPI_UpdateTeam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Team)) + }) + return _c +} + +func (_c *MockAPI_UpdateTeam_Call) Return(_a0 *model.Team, _a1 *model.AppError) *MockAPI_UpdateTeam_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateTeam_Call) RunAndReturn(run func(*model.Team) (*model.Team, *model.AppError)) *MockAPI_UpdateTeam_Call { + _c.Call.Return(run) + return _c +} + +// UpdateTeamMemberRoles provides a mock function with given fields: teamID, userID, newRoles +func (_m *MockAPI) UpdateTeamMemberRoles(teamID string, userID string, newRoles string) (*model.TeamMember, *model.AppError) { + ret := _m.Called(teamID, userID, newRoles) + + if len(ret) == 0 { + panic("no return value specified for UpdateTeamMemberRoles") + } + + var r0 *model.TeamMember + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string, string) (*model.TeamMember, *model.AppError)); ok { + return rf(teamID, userID, newRoles) + } + if rf, ok := ret.Get(0).(func(string, string, string) *model.TeamMember); ok { + r0 = rf(teamID, userID, newRoles) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.TeamMember) + } + } + + if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { + r1 = rf(teamID, userID, newRoles) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateTeamMemberRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTeamMemberRoles' +type MockAPI_UpdateTeamMemberRoles_Call struct { + *mock.Call +} + +// UpdateTeamMemberRoles is a helper method to define mock.On call +// - teamID string +// - userID string +// - newRoles string +func (_e *MockAPI_Expecter) UpdateTeamMemberRoles(teamID interface{}, userID interface{}, newRoles interface{}) *MockAPI_UpdateTeamMemberRoles_Call { + return &MockAPI_UpdateTeamMemberRoles_Call{Call: _e.mock.On("UpdateTeamMemberRoles", teamID, userID, newRoles)} +} + +func (_c *MockAPI_UpdateTeamMemberRoles_Call) Run(run func(teamID string, userID string, newRoles string)) *MockAPI_UpdateTeamMemberRoles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_UpdateTeamMemberRoles_Call) Return(_a0 *model.TeamMember, _a1 *model.AppError) *MockAPI_UpdateTeamMemberRoles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateTeamMemberRoles_Call) RunAndReturn(run func(string, string, string) (*model.TeamMember, *model.AppError)) *MockAPI_UpdateTeamMemberRoles_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUser provides a mock function with given fields: user +func (_m *MockAPI) UpdateUser(user *model.User) (*model.User, *model.AppError) { + ret := _m.Called(user) + + if len(ret) == 0 { + panic("no return value specified for UpdateUser") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok { + return rf(user) + } + if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { + r0 = rf(user) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(*model.User) *model.AppError); ok { + r1 = rf(user) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUser' +type MockAPI_UpdateUser_Call struct { + *mock.Call +} + +// UpdateUser is a helper method to define mock.On call +// - user *model.User +func (_e *MockAPI_Expecter) UpdateUser(user interface{}) *MockAPI_UpdateUser_Call { + return &MockAPI_UpdateUser_Call{Call: _e.mock.On("UpdateUser", user)} +} + +func (_c *MockAPI_UpdateUser_Call) Run(run func(user *model.User)) *MockAPI_UpdateUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.User)) + }) + return _c +} + +func (_c *MockAPI_UpdateUser_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_UpdateUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateUser_Call) RunAndReturn(run func(*model.User) (*model.User, *model.AppError)) *MockAPI_UpdateUser_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUserActive provides a mock function with given fields: userID, active +func (_m *MockAPI) UpdateUserActive(userID string, active bool) *model.AppError { + ret := _m.Called(userID, active) + + if len(ret) == 0 { + panic("no return value specified for UpdateUserActive") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, bool) *model.AppError); ok { + r0 = rf(userID, active) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_UpdateUserActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserActive' +type MockAPI_UpdateUserActive_Call struct { + *mock.Call +} + +// UpdateUserActive is a helper method to define mock.On call +// - userID string +// - active bool +func (_e *MockAPI_Expecter) UpdateUserActive(userID interface{}, active interface{}) *MockAPI_UpdateUserActive_Call { + return &MockAPI_UpdateUserActive_Call{Call: _e.mock.On("UpdateUserActive", userID, active)} +} + +func (_c *MockAPI_UpdateUserActive_Call) Run(run func(userID string, active bool)) *MockAPI_UpdateUserActive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *MockAPI_UpdateUserActive_Call) Return(_a0 *model.AppError) *MockAPI_UpdateUserActive_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UpdateUserActive_Call) RunAndReturn(run func(string, bool) *model.AppError) *MockAPI_UpdateUserActive_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUserAuth provides a mock function with given fields: userID, userAuth +func (_m *MockAPI) UpdateUserAuth(userID string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError) { + ret := _m.Called(userID, userAuth) + + if len(ret) == 0 { + panic("no return value specified for UpdateUserAuth") + } + + var r0 *model.UserAuth + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, *model.UserAuth) (*model.UserAuth, *model.AppError)); ok { + return rf(userID, userAuth) + } + if rf, ok := ret.Get(0).(func(string, *model.UserAuth) *model.UserAuth); ok { + r0 = rf(userID, userAuth) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.UserAuth) + } + } + + if rf, ok := ret.Get(1).(func(string, *model.UserAuth) *model.AppError); ok { + r1 = rf(userID, userAuth) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateUserAuth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserAuth' +type MockAPI_UpdateUserAuth_Call struct { + *mock.Call +} + +// UpdateUserAuth is a helper method to define mock.On call +// - userID string +// - userAuth *model.UserAuth +func (_e *MockAPI_Expecter) UpdateUserAuth(userID interface{}, userAuth interface{}) *MockAPI_UpdateUserAuth_Call { + return &MockAPI_UpdateUserAuth_Call{Call: _e.mock.On("UpdateUserAuth", userID, userAuth)} +} + +func (_c *MockAPI_UpdateUserAuth_Call) Run(run func(userID string, userAuth *model.UserAuth)) *MockAPI_UpdateUserAuth_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.UserAuth)) + }) + return _c +} + +func (_c *MockAPI_UpdateUserAuth_Call) Return(_a0 *model.UserAuth, _a1 *model.AppError) *MockAPI_UpdateUserAuth_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateUserAuth_Call) RunAndReturn(run func(string, *model.UserAuth) (*model.UserAuth, *model.AppError)) *MockAPI_UpdateUserAuth_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUserCustomStatus provides a mock function with given fields: userID, customStatus +func (_m *MockAPI) UpdateUserCustomStatus(userID string, customStatus *model.CustomStatus) *model.AppError { + ret := _m.Called(userID, customStatus) + + if len(ret) == 0 { + panic("no return value specified for UpdateUserCustomStatus") + } + + var r0 *model.AppError + if rf, ok := ret.Get(0).(func(string, *model.CustomStatus) *model.AppError); ok { + r0 = rf(userID, customStatus) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.AppError) + } + } + + return r0 +} + +// MockAPI_UpdateUserCustomStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserCustomStatus' +type MockAPI_UpdateUserCustomStatus_Call struct { + *mock.Call +} + +// UpdateUserCustomStatus is a helper method to define mock.On call +// - userID string +// - customStatus *model.CustomStatus +func (_e *MockAPI_Expecter) UpdateUserCustomStatus(userID interface{}, customStatus interface{}) *MockAPI_UpdateUserCustomStatus_Call { + return &MockAPI_UpdateUserCustomStatus_Call{Call: _e.mock.On("UpdateUserCustomStatus", userID, customStatus)} +} + +func (_c *MockAPI_UpdateUserCustomStatus_Call) Run(run func(userID string, customStatus *model.CustomStatus)) *MockAPI_UpdateUserCustomStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*model.CustomStatus)) + }) + return _c +} + +func (_c *MockAPI_UpdateUserCustomStatus_Call) Return(_a0 *model.AppError) *MockAPI_UpdateUserCustomStatus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPI_UpdateUserCustomStatus_Call) RunAndReturn(run func(string, *model.CustomStatus) *model.AppError) *MockAPI_UpdateUserCustomStatus_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUserRoles provides a mock function with given fields: userID, newRoles +func (_m *MockAPI) UpdateUserRoles(userID string, newRoles string) (*model.User, *model.AppError) { + ret := _m.Called(userID, newRoles) + + if len(ret) == 0 { + panic("no return value specified for UpdateUserRoles") + } + + var r0 *model.User + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.User, *model.AppError)); ok { + return rf(userID, newRoles) + } + if rf, ok := ret.Get(0).(func(string, string) *model.User); ok { + r0 = rf(userID, newRoles) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.User) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(userID, newRoles) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateUserRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserRoles' +type MockAPI_UpdateUserRoles_Call struct { + *mock.Call +} + +// UpdateUserRoles is a helper method to define mock.On call +// - userID string +// - newRoles string +func (_e *MockAPI_Expecter) UpdateUserRoles(userID interface{}, newRoles interface{}) *MockAPI_UpdateUserRoles_Call { + return &MockAPI_UpdateUserRoles_Call{Call: _e.mock.On("UpdateUserRoles", userID, newRoles)} +} + +func (_c *MockAPI_UpdateUserRoles_Call) Run(run func(userID string, newRoles string)) *MockAPI_UpdateUserRoles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_UpdateUserRoles_Call) Return(_a0 *model.User, _a1 *model.AppError) *MockAPI_UpdateUserRoles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateUserRoles_Call) RunAndReturn(run func(string, string) (*model.User, *model.AppError)) *MockAPI_UpdateUserRoles_Call { + _c.Call.Return(run) + return _c +} + +// UpdateUserStatus provides a mock function with given fields: userID, status +func (_m *MockAPI) UpdateUserStatus(userID string, status string) (*model.Status, *model.AppError) { + ret := _m.Called(userID, status) + + if len(ret) == 0 { + panic("no return value specified for UpdateUserStatus") + } + + var r0 *model.Status + var r1 *model.AppError + if rf, ok := ret.Get(0).(func(string, string) (*model.Status, *model.AppError)); ok { + return rf(userID, status) + } + if rf, ok := ret.Get(0).(func(string, string) *model.Status); ok { + r0 = rf(userID, status) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.Status) + } + } + + if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { + r1 = rf(userID, status) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UpdateUserStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserStatus' +type MockAPI_UpdateUserStatus_Call struct { + *mock.Call +} + +// UpdateUserStatus is a helper method to define mock.On call +// - userID string +// - status string +func (_e *MockAPI_Expecter) UpdateUserStatus(userID interface{}, status interface{}) *MockAPI_UpdateUserStatus_Call { + return &MockAPI_UpdateUserStatus_Call{Call: _e.mock.On("UpdateUserStatus", userID, status)} +} + +func (_c *MockAPI_UpdateUserStatus_Call) Run(run func(userID string, status string)) *MockAPI_UpdateUserStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *MockAPI_UpdateUserStatus_Call) Return(_a0 *model.Status, _a1 *model.AppError) *MockAPI_UpdateUserStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UpdateUserStatus_Call) RunAndReturn(run func(string, string) (*model.Status, *model.AppError)) *MockAPI_UpdateUserStatus_Call { + _c.Call.Return(run) + return _c +} + +// UploadData provides a mock function with given fields: us, rd +func (_m *MockAPI) UploadData(us *model.UploadSession, rd io.Reader) (*model.FileInfo, error) { + ret := _m.Called(us, rd) + + if len(ret) == 0 { + panic("no return value specified for UploadData") + } + + var r0 *model.FileInfo + var r1 error + if rf, ok := ret.Get(0).(func(*model.UploadSession, io.Reader) (*model.FileInfo, error)); ok { + return rf(us, rd) + } + if rf, ok := ret.Get(0).(func(*model.UploadSession, io.Reader) *model.FileInfo); ok { + r0 = rf(us, rd) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.FileInfo) + } + } + + if rf, ok := ret.Get(1).(func(*model.UploadSession, io.Reader) error); ok { + r1 = rf(us, rd) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAPI_UploadData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadData' +type MockAPI_UploadData_Call struct { + *mock.Call +} + +// UploadData is a helper method to define mock.On call +// - us *model.UploadSession +// - rd io.Reader +func (_e *MockAPI_Expecter) UploadData(us interface{}, rd interface{}) *MockAPI_UploadData_Call { + return &MockAPI_UploadData_Call{Call: _e.mock.On("UploadData", us, rd)} +} + +func (_c *MockAPI_UploadData_Call) Run(run func(us *model.UploadSession, rd io.Reader)) *MockAPI_UploadData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.UploadSession), args[1].(io.Reader)) + }) + return _c +} + +func (_c *MockAPI_UploadData_Call) Return(_a0 *model.FileInfo, _a1 error) *MockAPI_UploadData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UploadData_Call) RunAndReturn(run func(*model.UploadSession, io.Reader) (*model.FileInfo, error)) *MockAPI_UploadData_Call { + _c.Call.Return(run) + return _c +} + +// UploadFile provides a mock function with given fields: data, channelId, filename +func (_m *MockAPI) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError) { + ret := _m.Called(data, channelId, filename) + + if len(ret) == 0 { + panic("no return value specified for UploadFile") + } + + var r0 *model.FileInfo + var r1 *model.AppError + if rf, ok := ret.Get(0).(func([]byte, string, string) (*model.FileInfo, *model.AppError)); ok { + return rf(data, channelId, filename) + } + if rf, ok := ret.Get(0).(func([]byte, string, string) *model.FileInfo); ok { + r0 = rf(data, channelId, filename) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.FileInfo) + } + } + + if rf, ok := ret.Get(1).(func([]byte, string, string) *model.AppError); ok { + r1 = rf(data, channelId, filename) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + +// MockAPI_UploadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadFile' +type MockAPI_UploadFile_Call struct { + *mock.Call +} + +// UploadFile is a helper method to define mock.On call +// - data []byte +// - channelId string +// - filename string +func (_e *MockAPI_Expecter) UploadFile(data interface{}, channelId interface{}, filename interface{}) *MockAPI_UploadFile_Call { + return &MockAPI_UploadFile_Call{Call: _e.mock.On("UploadFile", data, channelId, filename)} +} + +func (_c *MockAPI_UploadFile_Call) Run(run func(data []byte, channelId string, filename string)) *MockAPI_UploadFile_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *MockAPI_UploadFile_Call) Return(_a0 *model.FileInfo, _a1 *model.AppError) *MockAPI_UploadFile_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAPI_UploadFile_Call) RunAndReturn(run func([]byte, string, string) (*model.FileInfo, *model.AppError)) *MockAPI_UploadFile_Call { + _c.Call.Return(run) + return _c +} + +// NewMockAPI creates a new instance of MockAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockAPI(t interface { + mock.TestingT + Cleanup(func()) +}) *MockAPI { + mock := &MockAPI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/plugin.go b/server/plugin.go index 5f98df0..82f8735 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -177,29 +177,34 @@ func (p *Plugin) OnActivate() error { } manager.ApplyConfig(scpCfg) - if p.isHA() { - p.waitGroup.Add(1) - go func() { - defer p.waitGroup.Done() + // In HA, we want to continuously check for changes to the cluster (e.g. nodes joining/leaving). + // In not-HA, we still want to regenerate targets in case plugins + // providing metrics (e.g. Calls) started after we did. + p.waitGroup.Add(1) + go func() { + defer p.waitGroup.Done() - // a minute should be the smallest amount of time to ping the table - // as the default scrape interval is already a minute. - ticker := time.NewTicker(time.Minute) - defer ticker.Stop() + // a minute should be the smallest amount of time to ping the table + // as the default scrape interval is already a minute. + ticker := time.NewTicker(time.Minute) + defer ticker.Stop() + var db *sqlx.DB + if p.isHA() { idb, err := p.client.Store.GetMasterDB() if err != nil { p.API.LogError("Could not initiate the database connection", "error", err.Error()) return } - db := sqlx.NewDb(idb, p.client.Store.DriverName()) + db = sqlx.NewDb(idb, p.client.Store.DriverName()) defer db.Close() + } - var currentList []*mmModel.ClusterDiscovery - - for { - select { - case <-ticker.C: + var currentList []*mmModel.ClusterDiscovery + for { + select { + case <-ticker.C: + if p.isHA() { list, err := pingClusterDiscoveryTable(db, *p.API.GetConfig().ClusterSettings.ClusterName) if err != nil { p.API.LogError("Could not ping the cluster discovery table", "error", err.Error()) @@ -210,26 +215,20 @@ func (p *Plugin) OnActivate() error { continue } currentList = list + } - sync, err := generateTargetGroup(p.API.GetConfig(), list) - if err != nil { - p.API.LogError("Could not genarate target group for cluster", "error", err.Error()) - return - } - syncCh <- sync - case <-p.closeChan: - p.API.LogDebug("Cluster ping process stopped") + sync, err := p.generateTargetGroup(p.API.GetConfig(), currentList) + if err != nil { + p.API.LogError("Could not genarate target group for cluster", "error", err.Error()) return } + syncCh <- sync + case <-p.closeChan: + p.API.LogDebug("Cluster ping process stopped") + return } - }() - } else { - sync, err := generateTargetGroup(p.API.GetConfig(), nil) - if err != nil { - return fmt.Errorf("could not set scrape target :%w", err) } - syncCh <- sync - } + }() p.waitGroup.Add(1) go func() {