mocks

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCYReader

type CCYReader struct {
	ReadAllowedCCYfn func(ctx context.Context) (int, error)
}

CCYReader is a mock implemention for the concurrency.Reader interface.

func (CCYReader) ReadAllowedCCY

func (r CCYReader) ReadAllowedCCY(ctx context.Context) (int, error)

ReadAllowedCCY is a wrapper around CCYReader.ReadAllowedCCYfn.

type FakeJobReader

type FakeJobReader struct {
	ReadJobFn                func(ctx context.Context, id string) (job.Job, error)
	PollJobFn                func(ctx context.Context, id string, interval time.Duration) (job.Job, error)
	GetJobAssetFileContentFn func(ctx context.Context, jobID, fileName string) ([]byte, error)
}

FakeJobReader resto mock

func (*FakeJobReader) GetJobAssetFileContent

func (fjr *FakeJobReader) GetJobAssetFileContent(ctx context.Context, jobID, fileName string) ([]byte, error)

GetJobAssetFileContent mock function

func (*FakeJobReader) PollJob

func (fjr *FakeJobReader) PollJob(ctx context.Context, id string, interval time.Duration) (job.Job, error)

PollJob mock function

func (*FakeJobReader) ReadJob

func (fjr *FakeJobReader) ReadJob(ctx context.Context, id string) (job.Job, error)

ReadJob mock function

type FakeJobStarter

type FakeJobStarter struct {
	StartJobFn                        func(ctx context.Context, opts job.StartOptions) (jobID string, err error)
	CheckFrameworkAvailabilitySuccess bool
}

FakeJobStarter resto mock

func (*FakeJobStarter) CheckFrameworkAvailability

func (fjs *FakeJobStarter) CheckFrameworkAvailability(ctx context.Context, frameworkName string) error

CheckFrameworkAvailability mock function

func (*FakeJobStarter) StartJob

func (fjs *FakeJobStarter) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, err error)

StartJob mock function

type FakeProjectUploader

type FakeProjectUploader struct {
	UploadSuccess bool
}

FakeProjectUploader mock struct

func (*FakeProjectUploader) Upload

func (fpu *FakeProjectUploader) Upload(name string) (storage.ArtifactMeta, error)

Upload mock function

Jump to

Keyboard shortcuts

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