service

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoContent = errors.New("no content")
View Source
var ErrPipeNotConfigured = errors.New("pipe is not configured")

Functions

This section is empty.

Types

type AuthorizationService

type AuthorizationService struct {
	// contains filtered or unexported fields
}

func NewAuthorizationService

func NewAuthorizationService(pipesStorage domain.PipesStorage, authorizationsStorage domain.AuthorizationsStorage, integrationsStorage domain.IntegrationsStorage, oAuthProvider domain.OAuthProvider) *AuthorizationService

func (*AuthorizationService) CreateAuthorization

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

func (*AuthorizationService) DeleteAuthorization

func (svc *AuthorizationService) DeleteAuthorization(workspaceID int, serviceID domain.IntegrationID) error

func (*AuthorizationService) GetAuthURL

func (svc *AuthorizationService) GetAuthURL(serviceID domain.IntegrationID, accountName, callbackURL string) (string, error)

type HealthCheckService

type HealthCheckService struct {
	// contains filtered or unexported fields
}

func NewHealthCheckService

func NewHealthCheckService(pipesStorage domain.PipesStorage, togglClient domain.TogglClient) *HealthCheckService

func (*HealthCheckService) Ready

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

type LoadError

type LoadError struct{ Err error }

func (LoadError) Error

func (e LoadError) Error() string

func (LoadError) Unwrap

func (e LoadError) Unwrap() error

type PipeService

type PipeService struct {
	// contains filtered or unexported fields
}

func NewPipeService

func NewPipeService(pipesStorage domain.PipesStorage) *PipeService

func (*PipeService) CreatePipe

func (svc *PipeService) CreatePipe(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID, params []byte) error

func (*PipeService) DeletePipe

func (svc *PipeService) DeletePipe(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID) error

func (*PipeService) GetPipe

func (svc *PipeService) GetPipe(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID) (*domain.Pipe, error)

func (*PipeService) UpdatePipe

func (svc *PipeService) UpdatePipe(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID, params []byte) error

type PipeSyncService

type PipeSyncService struct {
	// contains filtered or unexported fields
}

func NewPipeSyncService

func NewPipeSyncService(pipesStorage domain.PipesStorage, authorizationsStorage domain.AuthorizationsStorage, integrationsStorage domain.IntegrationsStorage, idMappingsStorage domain.IDMappingsStorage, importsStorage domain.ImportsStorage, oAuthProvider domain.OAuthProvider, togglClient domain.TogglClient) *PipeSyncService

func (*PipeSyncService) ClearIDMappings deprecated

func (svc *PipeSyncService) ClearIDMappings(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID) error

Deprecated: TODO: Remove dead method. It's used only in h4xx0rz(old Backoffice) https://github.com/toggl/support/blob/master/app/controllers/workspaces_controller.rb#L145

func (*PipeSyncService) GetIntegrations

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

func (*PipeSyncService) GetServiceAccounts

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

func (*PipeSyncService) GetServicePipeLog

func (svc *PipeSyncService) GetServicePipeLog(workspaceID int, serviceID domain.IntegrationID, pipeID domain.PipeID) (string, error)

func (*PipeSyncService) GetServiceUsers

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

func (*PipeSyncService) Synchronize

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

type RefreshError

type RefreshError struct{ Err error }

func (RefreshError) Error

func (e RefreshError) Error() string

func (RefreshError) Unwrap

func (e RefreshError) Unwrap() error

type SetParamsError

type SetParamsError struct{ Err error }

func (SetParamsError) Error

func (e SetParamsError) Error() string

func (SetParamsError) Unwrap

func (e SetParamsError) Unwrap() error

type WorkerPool

type WorkerPool struct {
	Debug bool
	// contains filtered or unexported fields
}

func NewWorkerPool

func NewWorkerPool(queue domain.Queue, pipeSyncService domain.PipeSyncService, debug bool) *WorkerPool

func (*WorkerPool) Start

func (s *WorkerPool) Start()

Jump to

Keyboard shortcuts

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