Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v1.127.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	mock.Mock
}

Downloader is an autogenerated mock type for the Downloader type

func NewDownloader

func NewDownloader(t interface {
	mock.TestingT
	Cleanup(func())
}) *Downloader

NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Downloader) Download

func (_mock *Downloader) Download(ctx context.Context, w io.Writer, digest string) error

Download provides a mock function for the type Downloader

func (*Downloader) EXPECT added in v1.108.5

func (_m *Downloader) EXPECT() *Downloader_Expecter

func (*Downloader) IsReady

func (_mock *Downloader) IsReady(ctx context.Context) (bool, error)

IsReady provides a mock function for the type Downloader

type DownloaderUploader

type DownloaderUploader struct {
	mock.Mock
}

DownloaderUploader is an autogenerated mock type for the DownloaderUploader type

func NewDownloaderUploader

func NewDownloaderUploader(t interface {
	mock.TestingT
	Cleanup(func())
}) *DownloaderUploader

NewDownloaderUploader creates a new instance of DownloaderUploader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*DownloaderUploader) Download

func (_mock *DownloaderUploader) Download(ctx context.Context, w io.Writer, digest string) error

Download provides a mock function for the type DownloaderUploader

func (*DownloaderUploader) EXPECT added in v1.108.5

func (*DownloaderUploader) IsReady

func (_mock *DownloaderUploader) IsReady(ctx context.Context) (bool, error)

IsReady provides a mock function for the type DownloaderUploader

func (*DownloaderUploader) Upload

func (_mock *DownloaderUploader) Upload(ctx context.Context, r io.Reader, filename string, digest string) (*casclient.UpDownStatus, error)

Upload provides a mock function for the type DownloaderUploader

func (*DownloaderUploader) UploadFile

func (_mock *DownloaderUploader) UploadFile(ctx context.Context, filepath string) (*casclient.UpDownStatus, error)

UploadFile provides a mock function for the type DownloaderUploader

type DownloaderUploader_Download_Call added in v1.108.5

type DownloaderUploader_Download_Call struct {
	*mock.Call
}

DownloaderUploader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'

func (*DownloaderUploader_Download_Call) Return added in v1.108.5

func (*DownloaderUploader_Download_Call) Run added in v1.108.5

func (*DownloaderUploader_Download_Call) RunAndReturn added in v1.108.5

type DownloaderUploader_Expecter added in v1.108.5

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

func (*DownloaderUploader_Expecter) Download added in v1.108.5

Download is a helper method to define mock.On call

  • ctx context.Context
  • w io.Writer
  • digest string

func (*DownloaderUploader_Expecter) IsReady added in v1.108.5

IsReady is a helper method to define mock.On call

  • ctx context.Context

func (*DownloaderUploader_Expecter) Upload added in v1.108.5

func (_e *DownloaderUploader_Expecter) Upload(ctx any, r any, filename any, digest any) *DownloaderUploader_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • r io.Reader
  • filename string
  • digest string

func (*DownloaderUploader_Expecter) UploadFile added in v1.108.5

UploadFile is a helper method to define mock.On call

  • ctx context.Context
  • filepath string

type DownloaderUploader_IsReady_Call added in v1.108.5

type DownloaderUploader_IsReady_Call struct {
	*mock.Call
}

DownloaderUploader_IsReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsReady'

func (*DownloaderUploader_IsReady_Call) Return added in v1.108.5

func (*DownloaderUploader_IsReady_Call) Run added in v1.108.5

func (*DownloaderUploader_IsReady_Call) RunAndReturn added in v1.108.5

type DownloaderUploader_UploadFile_Call added in v1.108.5

type DownloaderUploader_UploadFile_Call struct {
	*mock.Call
}

DownloaderUploader_UploadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadFile'

func (*DownloaderUploader_UploadFile_Call) Return added in v1.108.5

func (*DownloaderUploader_UploadFile_Call) Run added in v1.108.5

func (*DownloaderUploader_UploadFile_Call) RunAndReturn added in v1.108.5

type DownloaderUploader_Upload_Call added in v1.108.5

type DownloaderUploader_Upload_Call struct {
	*mock.Call
}

DownloaderUploader_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'

func (*DownloaderUploader_Upload_Call) Return added in v1.108.5

func (*DownloaderUploader_Upload_Call) Run added in v1.108.5

func (*DownloaderUploader_Upload_Call) RunAndReturn added in v1.108.5

type Downloader_Download_Call added in v1.108.5

type Downloader_Download_Call struct {
	*mock.Call
}

Downloader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'

func (*Downloader_Download_Call) Return added in v1.108.5

func (*Downloader_Download_Call) Run added in v1.108.5

func (*Downloader_Download_Call) RunAndReturn added in v1.108.5

func (_c *Downloader_Download_Call) RunAndReturn(run func(ctx context.Context, w io.Writer, digest string) error) *Downloader_Download_Call

type Downloader_Expecter added in v1.108.5

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

func (*Downloader_Expecter) Download added in v1.108.5

func (_e *Downloader_Expecter) Download(ctx any, w any, digest any) *Downloader_Download_Call

Download is a helper method to define mock.On call

  • ctx context.Context
  • w io.Writer
  • digest string

func (*Downloader_Expecter) IsReady added in v1.108.5

IsReady is a helper method to define mock.On call

  • ctx context.Context

type Downloader_IsReady_Call added in v1.108.5

type Downloader_IsReady_Call struct {
	*mock.Call
}

Downloader_IsReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsReady'

func (*Downloader_IsReady_Call) Return added in v1.108.5

func (*Downloader_IsReady_Call) Run added in v1.108.5

func (*Downloader_IsReady_Call) RunAndReturn added in v1.108.5

func (_c *Downloader_IsReady_Call) RunAndReturn(run func(ctx context.Context) (bool, error)) *Downloader_IsReady_Call

type Uploader

type Uploader struct {
	mock.Mock
}

Uploader is an autogenerated mock type for the Uploader type

func NewUploader

func NewUploader(t mockConstructorTestingTNewUploader) *Uploader

NewUploader creates a new instance of Uploader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Uploader) IsReady

func (_m *Uploader) IsReady(ctx context.Context) (bool, error)

IsReady provides a mock function with given fields: ctx

func (*Uploader) Upload

func (_m *Uploader) Upload(ctx context.Context, r io.Reader, digest string, fileName string) (*casclient.UpDownStatus, error)

Upload provides a mock function with given fields: ctx, r, digest, fileName

func (*Uploader) UploadFile

func (_m *Uploader) UploadFile(ctx context.Context, filepath string) (*casclient.UpDownStatus, error)

UploadFile provides a mock function with given fields: ctx, filepath

Jump to

Keyboard shortcuts

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