Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
198 lines
4.4 KiB
Go
198 lines
4.4 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make telemetry-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
httpservice "github.com/mattermost/mattermost/server/public/shared/httpservice"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
|
|
plugin "github.com/mattermost/mattermost/server/public/plugin"
|
|
|
|
request "github.com/mattermost/mattermost/server/public/shared/request"
|
|
)
|
|
|
|
// ServerIface is an autogenerated mock type for the ServerIface type
|
|
type ServerIface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Config provides a mock function with no fields
|
|
func (_m *ServerIface) Config() *model.Config {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Config")
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// GetPluginsEnvironment provides a mock function with no fields
|
|
func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetPluginsEnvironment")
|
|
}
|
|
|
|
var r0 *plugin.Environment
|
|
if rf, ok := ret.Get(0).(func() *plugin.Environment); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*plugin.Environment)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetRoleByName provides a mock function with given fields: _a0, _a1
|
|
func (_m *ServerIface) GetRoleByName(_a0 request.CTX, _a1 string) (*model.Role, *model.AppError) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRoleByName")
|
|
}
|
|
|
|
var r0 *model.Role
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.Role, *model.AppError)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.Role); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Role)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetSchemes provides a mock function with given fields: _a0, _a1, _a2
|
|
func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme, *model.AppError) {
|
|
ret := _m.Called(_a0, _a1, _a2)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetSchemes")
|
|
}
|
|
|
|
var r0 []*model.Scheme
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, *model.AppError)); ok {
|
|
return rf(_a0, _a1, _a2)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Scheme); ok {
|
|
r0 = rf(_a0, _a1, _a2)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Scheme)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
|
r1 = rf(_a0, _a1, _a2)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// HTTPService provides a mock function with no fields
|
|
func (_m *ServerIface) HTTPService() httpservice.HTTPService {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for HTTPService")
|
|
}
|
|
|
|
var r0 httpservice.HTTPService
|
|
if rf, ok := ret.Get(0).(func() httpservice.HTTPService); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(httpservice.HTTPService)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsLeader provides a mock function with no fields
|
|
func (_m *ServerIface) IsLeader() bool {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsLeader")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// License provides a mock function with no fields
|
|
func (_m *ServerIface) License() *model.License {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for License")
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// NewServerIface creates a new instance of ServerIface. 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 NewServerIface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ServerIface {
|
|
mock := &ServerIface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|