mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
434 lines
15 KiB
Go
434 lines
15 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/ProtonMail/proton-bridge/internal/users (interfaces: Configer,PanicHandler,ClientManager,CredentialsStorer,StoreMaker)
|
|
|
|
// Package mocks is a generated GoMock package.
|
|
package mocks
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
store "github.com/ProtonMail/proton-bridge/internal/store"
|
|
credentials "github.com/ProtonMail/proton-bridge/internal/users/credentials"
|
|
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
|
gomock "github.com/golang/mock/gomock"
|
|
)
|
|
|
|
// MockConfiger is a mock of Configer interface
|
|
type MockConfiger struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockConfigerMockRecorder
|
|
}
|
|
|
|
// MockConfigerMockRecorder is the mock recorder for MockConfiger
|
|
type MockConfigerMockRecorder struct {
|
|
mock *MockConfiger
|
|
}
|
|
|
|
// NewMockConfiger creates a new mock instance
|
|
func NewMockConfiger(ctrl *gomock.Controller) *MockConfiger {
|
|
mock := &MockConfiger{ctrl: ctrl}
|
|
mock.recorder = &MockConfigerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockConfiger) EXPECT() *MockConfigerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// ClearData mocks base method
|
|
func (m *MockConfiger) ClearData() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ClearData")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// ClearData indicates an expected call of ClearData
|
|
func (mr *MockConfigerMockRecorder) ClearData() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearData", reflect.TypeOf((*MockConfiger)(nil).ClearData))
|
|
}
|
|
|
|
// GetAPIConfig mocks base method
|
|
func (m *MockConfiger) GetAPIConfig() *pmapi.ClientConfig {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetAPIConfig")
|
|
ret0, _ := ret[0].(*pmapi.ClientConfig)
|
|
return ret0
|
|
}
|
|
|
|
// GetAPIConfig indicates an expected call of GetAPIConfig
|
|
func (mr *MockConfigerMockRecorder) GetAPIConfig() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIConfig", reflect.TypeOf((*MockConfiger)(nil).GetAPIConfig))
|
|
}
|
|
|
|
// GetVersion mocks base method
|
|
func (m *MockConfiger) GetVersion() string {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetVersion")
|
|
ret0, _ := ret[0].(string)
|
|
return ret0
|
|
}
|
|
|
|
// GetVersion indicates an expected call of GetVersion
|
|
func (mr *MockConfigerMockRecorder) GetVersion() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockConfiger)(nil).GetVersion))
|
|
}
|
|
|
|
// MockPanicHandler is a mock of PanicHandler interface
|
|
type MockPanicHandler struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockPanicHandlerMockRecorder
|
|
}
|
|
|
|
// MockPanicHandlerMockRecorder is the mock recorder for MockPanicHandler
|
|
type MockPanicHandlerMockRecorder struct {
|
|
mock *MockPanicHandler
|
|
}
|
|
|
|
// NewMockPanicHandler creates a new mock instance
|
|
func NewMockPanicHandler(ctrl *gomock.Controller) *MockPanicHandler {
|
|
mock := &MockPanicHandler{ctrl: ctrl}
|
|
mock.recorder = &MockPanicHandlerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockPanicHandler) EXPECT() *MockPanicHandlerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// HandlePanic mocks base method
|
|
func (m *MockPanicHandler) HandlePanic() {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "HandlePanic")
|
|
}
|
|
|
|
// HandlePanic indicates an expected call of HandlePanic
|
|
func (mr *MockPanicHandlerMockRecorder) HandlePanic() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandlePanic", reflect.TypeOf((*MockPanicHandler)(nil).HandlePanic))
|
|
}
|
|
|
|
// MockClientManager is a mock of ClientManager interface
|
|
type MockClientManager struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockClientManagerMockRecorder
|
|
}
|
|
|
|
// MockClientManagerMockRecorder is the mock recorder for MockClientManager
|
|
type MockClientManagerMockRecorder struct {
|
|
mock *MockClientManager
|
|
}
|
|
|
|
// NewMockClientManager creates a new mock instance
|
|
func NewMockClientManager(ctrl *gomock.Controller) *MockClientManager {
|
|
mock := &MockClientManager{ctrl: ctrl}
|
|
mock.recorder = &MockClientManagerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockClientManager) EXPECT() *MockClientManagerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// AllowProxy mocks base method
|
|
func (m *MockClientManager) AllowProxy() {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AllowProxy")
|
|
}
|
|
|
|
// AllowProxy indicates an expected call of AllowProxy
|
|
func (mr *MockClientManagerMockRecorder) AllowProxy() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllowProxy", reflect.TypeOf((*MockClientManager)(nil).AllowProxy))
|
|
}
|
|
|
|
// CheckConnection mocks base method
|
|
func (m *MockClientManager) CheckConnection() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "CheckConnection")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// CheckConnection indicates an expected call of CheckConnection
|
|
func (mr *MockClientManagerMockRecorder) CheckConnection() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckConnection", reflect.TypeOf((*MockClientManager)(nil).CheckConnection))
|
|
}
|
|
|
|
// DisallowProxy mocks base method
|
|
func (m *MockClientManager) DisallowProxy() {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "DisallowProxy")
|
|
}
|
|
|
|
// DisallowProxy indicates an expected call of DisallowProxy
|
|
func (mr *MockClientManagerMockRecorder) DisallowProxy() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisallowProxy", reflect.TypeOf((*MockClientManager)(nil).DisallowProxy))
|
|
}
|
|
|
|
// GetAnonymousClient mocks base method
|
|
func (m *MockClientManager) GetAnonymousClient() pmapi.Client {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetAnonymousClient")
|
|
ret0, _ := ret[0].(pmapi.Client)
|
|
return ret0
|
|
}
|
|
|
|
// GetAnonymousClient indicates an expected call of GetAnonymousClient
|
|
func (mr *MockClientManagerMockRecorder) GetAnonymousClient() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnonymousClient", reflect.TypeOf((*MockClientManager)(nil).GetAnonymousClient))
|
|
}
|
|
|
|
// GetAuthUpdateChannel mocks base method
|
|
func (m *MockClientManager) GetAuthUpdateChannel() chan pmapi.ClientAuth {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetAuthUpdateChannel")
|
|
ret0, _ := ret[0].(chan pmapi.ClientAuth)
|
|
return ret0
|
|
}
|
|
|
|
// GetAuthUpdateChannel indicates an expected call of GetAuthUpdateChannel
|
|
func (mr *MockClientManagerMockRecorder) GetAuthUpdateChannel() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthUpdateChannel", reflect.TypeOf((*MockClientManager)(nil).GetAuthUpdateChannel))
|
|
}
|
|
|
|
// GetClient mocks base method
|
|
func (m *MockClientManager) GetClient(arg0 string) pmapi.Client {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetClient", arg0)
|
|
ret0, _ := ret[0].(pmapi.Client)
|
|
return ret0
|
|
}
|
|
|
|
// GetClient indicates an expected call of GetClient
|
|
func (mr *MockClientManagerMockRecorder) GetClient(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClient", reflect.TypeOf((*MockClientManager)(nil).GetClient), arg0)
|
|
}
|
|
|
|
// SetUserAgent mocks base method
|
|
func (m *MockClientManager) SetUserAgent(arg0, arg1, arg2 string) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetUserAgent", arg0, arg1, arg2)
|
|
}
|
|
|
|
// SetUserAgent indicates an expected call of SetUserAgent
|
|
func (mr *MockClientManagerMockRecorder) SetUserAgent(arg0, arg1, arg2 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUserAgent", reflect.TypeOf((*MockClientManager)(nil).SetUserAgent), arg0, arg1, arg2)
|
|
}
|
|
|
|
// MockCredentialsStorer is a mock of CredentialsStorer interface
|
|
type MockCredentialsStorer struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockCredentialsStorerMockRecorder
|
|
}
|
|
|
|
// MockCredentialsStorerMockRecorder is the mock recorder for MockCredentialsStorer
|
|
type MockCredentialsStorerMockRecorder struct {
|
|
mock *MockCredentialsStorer
|
|
}
|
|
|
|
// NewMockCredentialsStorer creates a new mock instance
|
|
func NewMockCredentialsStorer(ctrl *gomock.Controller) *MockCredentialsStorer {
|
|
mock := &MockCredentialsStorer{ctrl: ctrl}
|
|
mock.recorder = &MockCredentialsStorerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockCredentialsStorer) EXPECT() *MockCredentialsStorerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Add mocks base method
|
|
func (m *MockCredentialsStorer) Add(arg0, arg1, arg2, arg3 string, arg4 []string) (*credentials.Credentials, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Add", arg0, arg1, arg2, arg3, arg4)
|
|
ret0, _ := ret[0].(*credentials.Credentials)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Add indicates an expected call of Add
|
|
func (mr *MockCredentialsStorerMockRecorder) Add(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCredentialsStorer)(nil).Add), arg0, arg1, arg2, arg3, arg4)
|
|
}
|
|
|
|
// Delete mocks base method
|
|
func (m *MockCredentialsStorer) Delete(arg0 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Delete", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Delete indicates an expected call of Delete
|
|
func (mr *MockCredentialsStorerMockRecorder) Delete(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCredentialsStorer)(nil).Delete), arg0)
|
|
}
|
|
|
|
// Get mocks base method
|
|
func (m *MockCredentialsStorer) Get(arg0 string) (*credentials.Credentials, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Get", arg0)
|
|
ret0, _ := ret[0].(*credentials.Credentials)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Get indicates an expected call of Get
|
|
func (mr *MockCredentialsStorerMockRecorder) Get(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCredentialsStorer)(nil).Get), arg0)
|
|
}
|
|
|
|
// List mocks base method
|
|
func (m *MockCredentialsStorer) List() ([]string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "List")
|
|
ret0, _ := ret[0].([]string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// List indicates an expected call of List
|
|
func (mr *MockCredentialsStorerMockRecorder) List() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCredentialsStorer)(nil).List))
|
|
}
|
|
|
|
// Logout mocks base method
|
|
func (m *MockCredentialsStorer) Logout(arg0 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Logout", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Logout indicates an expected call of Logout
|
|
func (mr *MockCredentialsStorerMockRecorder) Logout(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logout", reflect.TypeOf((*MockCredentialsStorer)(nil).Logout), arg0)
|
|
}
|
|
|
|
// SwitchAddressMode mocks base method
|
|
func (m *MockCredentialsStorer) SwitchAddressMode(arg0 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SwitchAddressMode", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SwitchAddressMode indicates an expected call of SwitchAddressMode
|
|
func (mr *MockCredentialsStorerMockRecorder) SwitchAddressMode(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SwitchAddressMode", reflect.TypeOf((*MockCredentialsStorer)(nil).SwitchAddressMode), arg0)
|
|
}
|
|
|
|
// UpdateEmails mocks base method
|
|
func (m *MockCredentialsStorer) UpdateEmails(arg0 string, arg1 []string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdateEmails", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdateEmails indicates an expected call of UpdateEmails
|
|
func (mr *MockCredentialsStorerMockRecorder) UpdateEmails(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEmails", reflect.TypeOf((*MockCredentialsStorer)(nil).UpdateEmails), arg0, arg1)
|
|
}
|
|
|
|
// UpdatePassword mocks base method
|
|
func (m *MockCredentialsStorer) UpdatePassword(arg0, arg1 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdatePassword", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdatePassword indicates an expected call of UpdatePassword
|
|
func (mr *MockCredentialsStorerMockRecorder) UpdatePassword(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePassword", reflect.TypeOf((*MockCredentialsStorer)(nil).UpdatePassword), arg0, arg1)
|
|
}
|
|
|
|
// UpdateToken mocks base method
|
|
func (m *MockCredentialsStorer) UpdateToken(arg0, arg1 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdateToken", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdateToken indicates an expected call of UpdateToken
|
|
func (mr *MockCredentialsStorerMockRecorder) UpdateToken(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateToken", reflect.TypeOf((*MockCredentialsStorer)(nil).UpdateToken), arg0, arg1)
|
|
}
|
|
|
|
// MockStoreMaker is a mock of StoreMaker interface
|
|
type MockStoreMaker struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockStoreMakerMockRecorder
|
|
}
|
|
|
|
// MockStoreMakerMockRecorder is the mock recorder for MockStoreMaker
|
|
type MockStoreMakerMockRecorder struct {
|
|
mock *MockStoreMaker
|
|
}
|
|
|
|
// NewMockStoreMaker creates a new mock instance
|
|
func NewMockStoreMaker(ctrl *gomock.Controller) *MockStoreMaker {
|
|
mock := &MockStoreMaker{ctrl: ctrl}
|
|
mock.recorder = &MockStoreMakerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockStoreMaker) EXPECT() *MockStoreMakerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// New mocks base method
|
|
func (m *MockStoreMaker) New(arg0 store.BridgeUser) (*store.Store, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "New", arg0)
|
|
ret0, _ := ret[0].(*store.Store)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// New indicates an expected call of New
|
|
func (mr *MockStoreMakerMockRecorder) New(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockStoreMaker)(nil).New), arg0)
|
|
}
|
|
|
|
// Remove mocks base method
|
|
func (m *MockStoreMaker) Remove(arg0 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Remove", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Remove indicates an expected call of Remove
|
|
func (mr *MockStoreMakerMockRecorder) Remove(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockStoreMaker)(nil).Remove), arg0)
|
|
}
|