mocks

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationService

type AuthorizationService struct {
	mock.Mock
}

AuthorizationService is an autogenerated mock type for the AuthorizationService type

func (*AuthorizationService) CreateAuthorization

func (_m *AuthorizationService) CreateAuthorization(workspaceID int, sid domain.IntegrationID, workspaceToken string, params domain.AuthParams) error

CreateAuthorization provides a mock function with given fields: workspaceID, sid, workspaceToken, params

func (*AuthorizationService) DeleteAuthorization

func (_m *AuthorizationService) DeleteAuthorization(workspaceID int, sid domain.IntegrationID) error

DeleteAuthorization provides a mock function with given fields: workspaceID, sid

func (*AuthorizationService) GetAuthURL

func (_m *AuthorizationService) GetAuthURL(sid domain.IntegrationID, accountName string, callbackURL string) (string, error)

GetAuthURL provides a mock function with given fields: sid, accountName, callbackURL

type AuthorizationsStorage

type AuthorizationsStorage struct {
	mock.Mock
}

AuthorizationsStorage is an autogenerated mock type for the AuthorizationsStorage type

func (*AuthorizationsStorage) Delete

func (_m *AuthorizationsStorage) Delete(workspaceID int, externalServiceID domain.IntegrationID) error

Delete provides a mock function with given fields: workspaceID, externalServiceID

func (*AuthorizationsStorage) Load

func (_m *AuthorizationsStorage) Load(workspaceID int, externalServiceID domain.IntegrationID, a *domain.Authorization) error

Load provides a mock function with given fields: workspaceID, externalServiceID, a

func (*AuthorizationsStorage) LoadWorkspaceAuthorizations

func (_m *AuthorizationsStorage) LoadWorkspaceAuthorizations(workspaceID int) (map[domain.IntegrationID]bool, error)

LoadWorkspaceAuthorizations provides a mock function with given fields: workspaceID

func (*AuthorizationsStorage) Save

Save provides a mock function with given fields: a

type HealthCheckService

type HealthCheckService struct {
	mock.Mock
}

HealthCheckService is an autogenerated mock type for the HealthCheckService type

func (*HealthCheckService) Ready

func (_m *HealthCheckService) Ready() []error

Ready provides a mock function with given fields:

type IDMappingsStorage

type IDMappingsStorage struct {
	mock.Mock
}

IDMappingsStorage is an autogenerated mock type for the IDMappingsStorage type

func (*IDMappingsStorage) Delete

func (_m *IDMappingsStorage) Delete(workspaceID int, pipeConnectionKey string, pipeStatusKey string) error

Delete provides a mock function with given fields: workspaceID, pipeConnectionKey, pipeStatusKey

func (*IDMappingsStorage) Load

func (_m *IDMappingsStorage) Load(workspaceID int, key string) (*domain.IDMapping, error)

Load provides a mock function with given fields: workspaceID, key

func (*IDMappingsStorage) LoadReversed

func (_m *IDMappingsStorage) LoadReversed(workspaceID int, key string) (*domain.ReversedIDMapping, error)

LoadReversed provides a mock function with given fields: workspaceID, key

func (*IDMappingsStorage) Save

func (_m *IDMappingsStorage) Save(c *domain.IDMapping) error

Save provides a mock function with given fields: c

type ImportsStorage

type ImportsStorage struct {
	mock.Mock
}

ImportsStorage is an autogenerated mock type for the ImportsStorage type

func (*ImportsStorage) DeleteAccountsFor

func (_m *ImportsStorage) DeleteAccountsFor(s domain.PipeIntegration) error

DeleteAccountsFor provides a mock function with given fields: s

func (*ImportsStorage) DeleteUsersFor

func (_m *ImportsStorage) DeleteUsersFor(s domain.PipeIntegration) error

DeleteUsersFor provides a mock function with given fields: s

func (*ImportsStorage) LoadAccountsFor

LoadAccountsFor provides a mock function with given fields: s

func (*ImportsStorage) LoadClientsFor

LoadClientsFor provides a mock function with given fields: s

func (*ImportsStorage) LoadProjectsFor

LoadProjectsFor provides a mock function with given fields: s

func (*ImportsStorage) LoadTasksFor

LoadTasksFor provides a mock function with given fields: s

func (*ImportsStorage) LoadTodoListsFor

func (_m *ImportsStorage) LoadTodoListsFor(s domain.PipeIntegration) (*domain.TasksResponse, error)

LoadTodoListsFor provides a mock function with given fields: s

func (*ImportsStorage) LoadUsersFor

LoadUsersFor provides a mock function with given fields: s

func (*ImportsStorage) SaveAccountsFor

func (_m *ImportsStorage) SaveAccountsFor(s domain.PipeIntegration, res domain.AccountsResponse) error

SaveAccountsFor provides a mock function with given fields: s, res

func (*ImportsStorage) SaveClientsFor

func (_m *ImportsStorage) SaveClientsFor(s domain.PipeIntegration, res domain.ClientsResponse) error

SaveClientsFor provides a mock function with given fields: s, res

func (*ImportsStorage) SaveProjectsFor

func (_m *ImportsStorage) SaveProjectsFor(s domain.PipeIntegration, res domain.ProjectsResponse) error

SaveProjectsFor provides a mock function with given fields: s, res

func (*ImportsStorage) SaveTasksFor

SaveTasksFor provides a mock function with given fields: s, res

func (*ImportsStorage) SaveTodoListsFor

func (_m *ImportsStorage) SaveTodoListsFor(s domain.PipeIntegration, res domain.TasksResponse) error

SaveTodoListsFor provides a mock function with given fields: s, res

func (*ImportsStorage) SaveUsersFor

SaveUsersFor provides a mock function with given fields: s, res

type IntegrationsStorage

type IntegrationsStorage struct {
	mock.Mock
}

IntegrationsStorage is an autogenerated mock type for the IntegrationsStorage type

func (*IntegrationsStorage) IsValidPipe

func (_m *IntegrationsStorage) IsValidPipe(pipeID domain.PipeID) bool

IsValidPipe provides a mock function with given fields: pipeID

func (*IntegrationsStorage) IsValidService

func (_m *IntegrationsStorage) IsValidService(serviceID domain.IntegrationID) bool

IsValidService provides a mock function with given fields: serviceID

func (*IntegrationsStorage) LoadAuthorizationType

func (_m *IntegrationsStorage) LoadAuthorizationType(serviceID domain.IntegrationID) (string, error)

LoadAuthorizationType provides a mock function with given fields: serviceID

func (*IntegrationsStorage) LoadIntegrations

func (_m *IntegrationsStorage) LoadIntegrations() ([]*domain.Integration, error)

LoadIntegrations provides a mock function with given fields:

func (*IntegrationsStorage) SaveAuthorizationType

func (_m *IntegrationsStorage) SaveAuthorizationType(serviceID domain.IntegrationID, authType string) error

SaveAuthorizationType provides a mock function with given fields: serviceID, authType

type OAuthProvider

type OAuthProvider struct {
	mock.Mock
}

OAuthProvider is an autogenerated mock type for the OAuthProvider type

func (*OAuthProvider) OAuth1Configs

func (_m *OAuthProvider) OAuth1Configs(_a0 domain.IntegrationID) (*oauthplain.Config, bool)

OAuth1Configs provides a mock function with given fields: _a0

func (*OAuthProvider) OAuth1Exchange

func (_m *OAuthProvider) OAuth1Exchange(sid domain.IntegrationID, accountName string, oAuthToken string, oAuthVerifier string) (*oauthplain.Token, error)

OAuth1Exchange provides a mock function with given fields: sid, accountName, oAuthToken, oAuthVerifier

func (*OAuthProvider) OAuth2Configs

func (_m *OAuthProvider) OAuth2Configs(_a0 domain.IntegrationID) (*oauth.Config, bool)

OAuth2Configs provides a mock function with given fields: _a0

func (*OAuthProvider) OAuth2Exchange

func (_m *OAuthProvider) OAuth2Exchange(sid domain.IntegrationID, code string) (*oauth.Token, error)

OAuth2Exchange provides a mock function with given fields: sid, code

func (*OAuthProvider) OAuth2Refresh

func (_m *OAuthProvider) OAuth2Refresh(_a0 *oauth.Config, _a1 *oauth.Token) error

OAuth2Refresh provides a mock function with given fields: _a0, _a1

func (*OAuthProvider) OAuth2URL

func (_m *OAuthProvider) OAuth2URL(_a0 domain.IntegrationID) string

OAuth2URL provides a mock function with given fields: _a0

type PipeIntegration

type PipeIntegration struct {
	mock.Mock
}

PipeIntegration is an autogenerated mock type for the PipeIntegration type

func (*PipeIntegration) Accounts

func (_m *PipeIntegration) Accounts() ([]*domain.Account, error)

Accounts provides a mock function with given fields:

func (*PipeIntegration) Clients

func (_m *PipeIntegration) Clients() ([]*domain.Client, error)

Clients provides a mock function with given fields:

func (*PipeIntegration) ExportTimeEntry

func (_m *PipeIntegration) ExportTimeEntry(_a0 *domain.TimeEntry) (int, error)

ExportTimeEntry provides a mock function with given fields: _a0

func (*PipeIntegration) GetWorkspaceID

func (_m *PipeIntegration) GetWorkspaceID() int

GetWorkspaceID provides a mock function with given fields:

func (*PipeIntegration) ID

ID provides a mock function with given fields:

func (*PipeIntegration) KeyFor

func (_m *PipeIntegration) KeyFor(_a0 domain.PipeID) string

KeyFor provides a mock function with given fields: _a0

func (*PipeIntegration) Projects

func (_m *PipeIntegration) Projects() ([]*domain.Project, error)

Projects provides a mock function with given fields:

func (*PipeIntegration) SetAuthData

func (_m *PipeIntegration) SetAuthData(_a0 []byte) error

SetAuthData provides a mock function with given fields: _a0

func (*PipeIntegration) SetParams

func (_m *PipeIntegration) SetParams(_a0 []byte) error

SetParams provides a mock function with given fields: _a0

func (*PipeIntegration) SetSince

func (_m *PipeIntegration) SetSince(_a0 *time.Time)

SetSince provides a mock function with given fields: _a0

func (*PipeIntegration) Tasks

func (_m *PipeIntegration) Tasks() ([]*domain.Task, error)

Tasks provides a mock function with given fields:

func (*PipeIntegration) TodoLists

func (_m *PipeIntegration) TodoLists() ([]*domain.Task, error)

TodoLists provides a mock function with given fields:

func (*PipeIntegration) Users

func (_m *PipeIntegration) Users() ([]*domain.User, error)

Users provides a mock function with given fields:

type PipeService

type PipeService struct {
	mock.Mock
}

PipeService is an autogenerated mock type for the PipeService type

func (*PipeService) CreatePipe

func (_m *PipeService) CreatePipe(workspaceID int, sid domain.IntegrationID, pid domain.PipeID, params []byte) error

CreatePipe provides a mock function with given fields: workspaceID, sid, pid, params

func (*PipeService) DeletePipe

func (_m *PipeService) DeletePipe(workspaceID int, sid domain.IntegrationID, pid domain.PipeID) error

DeletePipe provides a mock function with given fields: workspaceID, sid, pid

func (*PipeService) GetPipe

func (_m *PipeService) GetPipe(workspaceID int, sid domain.IntegrationID, pid domain.PipeID) (*domain.Pipe, error)

GetPipe provides a mock function with given fields: workspaceID, sid, pid

func (*PipeService) UpdatePipe

func (_m *PipeService) UpdatePipe(workspaceID int, sid domain.IntegrationID, pid domain.PipeID, params []byte) error

UpdatePipe provides a mock function with given fields: workspaceID, sid, pid, params

type PipeSyncService

type PipeSyncService struct {
	mock.Mock
}

PipeSyncService is an autogenerated mock type for the PipeSyncService type

func (*PipeSyncService) ClearIDMappings

func (_m *PipeSyncService) ClearIDMappings(workspaceID int, sid domain.IntegrationID, pid domain.PipeID) error

ClearIDMappings provides a mock function with given fields: workspaceID, sid, pid

func (*PipeSyncService) GetIntegrations

func (_m *PipeSyncService) GetIntegrations(workspaceID int) ([]domain.Integration, error)

GetIntegrations provides a mock function with given fields: workspaceID

func (*PipeSyncService) GetServiceAccounts

func (_m *PipeSyncService) GetServiceAccounts(workspaceID int, sid domain.IntegrationID, forceImport bool) (*domain.AccountsResponse, error)

GetServiceAccounts provides a mock function with given fields: workspaceID, sid, forceImport

func (*PipeSyncService) GetServicePipeLog

func (_m *PipeSyncService) GetServicePipeLog(workspaceID int, sid domain.IntegrationID, pid domain.PipeID) (string, error)

GetServicePipeLog provides a mock function with given fields: workspaceID, sid, pid

func (*PipeSyncService) GetServiceUsers

func (_m *PipeSyncService) GetServiceUsers(workspaceID int, sid domain.IntegrationID, forceImport bool) (*domain.UsersResponse, error)

GetServiceUsers provides a mock function with given fields: workspaceID, sid, forceImport

func (*PipeSyncService) Synchronize

func (_m *PipeSyncService) Synchronize(p *domain.Pipe) error

Synchronize provides a mock function with given fields: p

type PipesStorage

type PipesStorage struct {
	mock.Mock
}

PipesStorage is an autogenerated mock type for the PipesStorage type

func (*PipesStorage) Delete

func (_m *PipesStorage) Delete(p *domain.Pipe, workspaceID int) error

Delete provides a mock function with given fields: p, workspaceID

func (*PipesStorage) DeleteByWorkspaceIDServiceID

func (_m *PipesStorage) DeleteByWorkspaceIDServiceID(workspaceID int, sid domain.IntegrationID) error

DeleteByWorkspaceIDServiceID provides a mock function with given fields: workspaceID, sid

func (*PipesStorage) IsDown

func (_m *PipesStorage) IsDown() bool

IsDown provides a mock function with given fields:

func (*PipesStorage) Load

func (_m *PipesStorage) Load(p *domain.Pipe) error

Load provides a mock function with given fields: p

func (*PipesStorage) LoadAll

func (_m *PipesStorage) LoadAll(workspaceID int) (map[string]*domain.Pipe, error)

LoadAll provides a mock function with given fields: workspaceID

func (*PipesStorage) LoadAllStatuses

func (_m *PipesStorage) LoadAllStatuses(workspaceID int) (map[string]*domain.Status, error)

LoadAllStatuses provides a mock function with given fields: workspaceID

func (*PipesStorage) LoadLastSyncFor

func (_m *PipesStorage) LoadLastSyncFor(p *domain.Pipe)

LoadLastSyncFor provides a mock function with given fields: p

func (*PipesStorage) LoadStatus

func (_m *PipesStorage) LoadStatus(workspaceID int, sid domain.IntegrationID, pid domain.PipeID) (*domain.Status, error)

LoadStatus provides a mock function with given fields: workspaceID, sid, pid

func (*PipesStorage) Save

func (_m *PipesStorage) Save(p *domain.Pipe) error

Save provides a mock function with given fields: p

func (*PipesStorage) SaveStatus

func (_m *PipesStorage) SaveStatus(p *domain.Status) error

SaveStatus provides a mock function with given fields: p

type Queue

type Queue struct {
	mock.Mock
}

Queue is an autogenerated mock type for the Queue type

func (*Queue) LoadScheduledPipes

func (_m *Queue) LoadScheduledPipes() ([]*domain.Pipe, error)

LoadScheduledPipes provides a mock function with given fields:

func (*Queue) MarkPipeSynchronized

func (_m *Queue) MarkPipeSynchronized(_a0 *domain.Pipe) error

MarkPipeSynchronized provides a mock function with given fields: _a0

func (*Queue) ScheduleAutomaticPipesSynchronization

func (_m *Queue) ScheduleAutomaticPipesSynchronization() error

ScheduleAutomaticPipesSynchronization provides a mock function with given fields:

func (*Queue) SchedulePipeSynchronization

func (_m *Queue) SchedulePipeSynchronization(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID, usersSelector domain.UserParams) error

SchedulePipeSynchronization provides a mock function with given fields: workspaceID, serviceID, pipeID, usersSelector

type TogglClient

type TogglClient struct {
	mock.Mock
}

TogglClient is an autogenerated mock type for the TogglClient type

func (*TogglClient) AdjustRequestSize

func (_m *TogglClient) AdjustRequestSize(tasks []*domain.Task, split int) ([]*domain.TaskRequest, error)

AdjustRequestSize provides a mock function with given fields: tasks, split

func (*TogglClient) GetTimeEntries

func (_m *TogglClient) GetTimeEntries(lastSync time.Time, userIDs []int, projectsIDs []int) ([]domain.TimeEntry, error)

GetTimeEntries provides a mock function with given fields: lastSync, userIDs, projectsIDs

func (*TogglClient) GetWorkspaceIdByToken

func (_m *TogglClient) GetWorkspaceIdByToken(token string) (int, error)

GetWorkspaceIdByToken provides a mock function with given fields: token

func (*TogglClient) Ping

func (_m *TogglClient) Ping() error

Ping provides a mock function with given fields:

func (*TogglClient) PostClients

func (_m *TogglClient) PostClients(clientsPipeID domain.PipeID, clients interface{}) (*domain.ClientsImport, error)

PostClients provides a mock function with given fields: clientsPipeID, clients

func (*TogglClient) PostProjects

func (_m *TogglClient) PostProjects(projectsPipeID domain.PipeID, projects interface{}) (*domain.ProjectsImport, error)

PostProjects provides a mock function with given fields: projectsPipeID, projects

func (*TogglClient) PostTasks

func (_m *TogglClient) PostTasks(tasksPipeID domain.PipeID, tasks interface{}) (*domain.TasksImport, error)

PostTasks provides a mock function with given fields: tasksPipeID, tasks

func (*TogglClient) PostTodoLists

func (_m *TogglClient) PostTodoLists(tasksPipeID domain.PipeID, tasks interface{}) (*domain.TasksImport, error)

PostTodoLists provides a mock function with given fields: tasksPipeID, tasks

func (*TogglClient) PostUsers

func (_m *TogglClient) PostUsers(usersPipeID domain.PipeID, users interface{}) (*domain.UsersImport, error)

PostUsers provides a mock function with given fields: usersPipeID, users

func (*TogglClient) WithAuthToken

func (_m *TogglClient) WithAuthToken(authToken string)

WithAuthToken provides a mock function with given fields: authToken

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL