mockauth_interface.go
TLDR
This file contains a generated mock of the AuthInterface
interface from the github.com/mattermost/focalboard/server/auth
package. The mock provides methods to simulate the behavior of the original interface.
Methods
DoesUserHaveTeamAccess
Simulates the behavior of the DoesUserHaveTeamAccess
method from the AuthInterface
interface. It takes two string arguments and returns a boolean value.
GetSession
Simulates the behavior of the GetSession
method from the AuthInterface
interface. It takes a string argument and returns a pointer to a model.Session
object and an error.
IsValidReadToken
Simulates the behavior of the IsValidReadToken
method from the AuthInterface
interface. It takes two string arguments and returns a boolean value and an error.
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/mattermost/focalboard/server/auth (interfaces: AuthInterface)
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
model "github.com/mattermost/focalboard/server/model"
)
// MockAuthInterface is a mock of AuthInterface interface.
type MockAuthInterface struct {
ctrl *gomock.Controller
recorder *MockAuthInterfaceMockRecorder
}
// MockAuthInterfaceMockRecorder is the mock recorder for MockAuthInterface.
type MockAuthInterfaceMockRecorder struct {
mock *MockAuthInterface
}
// NewMockAuthInterface creates a new mock instance.
func NewMockAuthInterface(ctrl *gomock.Controller) *MockAuthInterface {
mock := &MockAuthInterface{ctrl: ctrl}
mock.recorder = &MockAuthInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAuthInterface) EXPECT() *MockAuthInterfaceMockRecorder {
return m.recorder
}
// DoesUserHaveTeamAccess mocks base method.
func (m *MockAuthInterface) DoesUserHaveTeamAccess(arg0, arg1 string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DoesUserHaveTeamAccess", arg0, arg1)
ret0, _ := ret[0].(bool)
return ret0
}
// DoesUserHaveTeamAccess indicates an expected call of DoesUserHaveTeamAccess.
func (mr *MockAuthInterfaceMockRecorder) DoesUserHaveTeamAccess(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoesUserHaveTeamAccess", reflect.TypeOf((*MockAuthInterface)(nil).DoesUserHaveTeamAccess), arg0, arg1)
}
// GetSession mocks base method.
func (m *MockAuthInterface) GetSession(arg0 string) (*model.Session, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetSession", arg0)
ret0, _ := ret[0].(*model.Session)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSession indicates an expected call of GetSession.
func (mr *MockAuthInterfaceMockRecorder) GetSession(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSession", reflect.TypeOf((*MockAuthInterface)(nil).GetSession), arg0)
}
// IsValidReadToken mocks base method.
func (m *MockAuthInterface) IsValidReadToken(arg0, arg1 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsValidReadToken", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IsValidReadToken indicates an expected call of IsValidReadToken.
func (mr *MockAuthInterfaceMockRecorder) IsValidReadToken(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsValidReadToken", reflect.TypeOf((*MockAuthInterface)(nil).IsValidReadToken), arg0, arg1)
}