service

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package service is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	Get(ctx context.Context) (model.Job, error)
	UpdateStatus(ctx context.Context, status model.JobStatus, jobID int) error
}

type JobSvc

type JobSvc struct {
	API        APIClient
	Deleter    deleter
	DestDetail destDetail
}

func (*JobSvc) JobSvc

func (js *JobSvc) JobSvc(ctx context.Context) error

called by looper calls api-client.getJob(workspaceID) calls api-client to get new job with workspaceID, which returns jobID.

type Looper

type Looper struct {
	Svc JobSvc
}

func (*Looper) Loop

func (l *Looper) Loop(ctx context.Context) error

type MockAPIClient added in v1.5.0

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

MockAPIClient is a mock of APIClient interface.

func NewMockAPIClient added in v1.5.0

func NewMockAPIClient(ctrl *gomock.Controller) *MockAPIClient

NewMockAPIClient creates a new mock instance.

func (*MockAPIClient) EXPECT added in v1.5.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAPIClient) Get added in v1.5.0

func (m *MockAPIClient) Get(ctx context.Context) (model.Job, error)

Get mocks base method.

func (*MockAPIClient) UpdateStatus added in v1.5.0

func (m *MockAPIClient) UpdateStatus(ctx context.Context, status model.JobStatus, jobID int) error

UpdateStatus mocks base method.

type MockAPIClientMockRecorder added in v1.5.0

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

MockAPIClientMockRecorder is the mock recorder for MockAPIClient.

func (*MockAPIClientMockRecorder) Get added in v1.5.0

func (mr *MockAPIClientMockRecorder) Get(ctx interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockAPIClientMockRecorder) UpdateStatus added in v1.5.0

func (mr *MockAPIClientMockRecorder) UpdateStatus(ctx, status, jobID interface{}) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

type Mockdeleter added in v1.5.0

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

Mockdeleter is a mock of deleter interface.

func NewMockdeleter added in v1.5.0

func NewMockdeleter(ctrl *gomock.Controller) *Mockdeleter

NewMockdeleter creates a new mock instance.

func (*Mockdeleter) Delete added in v1.5.0

func (m *Mockdeleter) Delete(ctx context.Context, job model.Job, destDetail model.Destination) model.JobStatus

Delete mocks base method.

func (*Mockdeleter) EXPECT added in v1.5.0

func (m *Mockdeleter) EXPECT() *MockdeleterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockdeleterMockRecorder added in v1.5.0

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

MockdeleterMockRecorder is the mock recorder for Mockdeleter.

func (*MockdeleterMockRecorder) Delete added in v1.5.0

func (mr *MockdeleterMockRecorder) Delete(ctx, job, destDetail interface{}) *gomock.Call

Delete indicates an expected call of Delete.

type MockdestDetail added in v1.5.0

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

MockdestDetail is a mock of destDetail interface.

func NewMockdestDetail added in v1.5.0

func NewMockdestDetail(ctrl *gomock.Controller) *MockdestDetail

NewMockdestDetail creates a new mock instance.

func (*MockdestDetail) EXPECT added in v1.5.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockdestDetail) GetDestDetails added in v1.5.0

func (m *MockdestDetail) GetDestDetails(destID string) (model.Destination, error)

GetDestDetails mocks base method.

type MockdestDetailMockRecorder added in v1.5.0

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

MockdestDetailMockRecorder is the mock recorder for MockdestDetail.

func (*MockdestDetailMockRecorder) GetDestDetails added in v1.5.0

func (mr *MockdestDetailMockRecorder) GetDestDetails(destID interface{}) *gomock.Call

GetDestDetails indicates an expected call of GetDestDetails.

Jump to

Keyboard shortcuts

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