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

backend

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 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 Backend

type Backend struct {
	mock.Mock
}

Backend is an autogenerated mock type for the Backend type

func NewBackend

func NewBackend(t interface {
	mock.TestingT
	Cleanup(func())
}) *Backend

NewBackend creates a new instance of Backend. 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 (*Backend) Attach

func (_m *Backend) Attach(ctx context.Context, filepath string, cfg *config.Attach) error

Attach provides a mock function with given fields: ctx, filepath, cfg

func (*Backend) Build

func (_m *Backend) Build(ctx context.Context, modelfilePath string, workDir string, target string, cfg *config.Build) error

Build provides a mock function with given fields: ctx, modelfilePath, workDir, target, cfg

func (*Backend) EXPECT

func (_m *Backend) EXPECT() *Backend_Expecter

func (*Backend) Extract

func (_m *Backend) Extract(ctx context.Context, target string, cfg *config.Extract) error

Extract provides a mock function with given fields: ctx, target, cfg

func (*Backend) Fetch

func (_m *Backend) Fetch(ctx context.Context, target string, cfg *config.Fetch) error

Fetch provides a mock function with given fields: ctx, target, cfg

func (*Backend) Inspect

func (_m *Backend) Inspect(ctx context.Context, target string, cfg *config.Inspect) (interface{}, error)

Inspect provides a mock function with given fields: ctx, target, cfg

func (*Backend) List

func (_m *Backend) List(ctx context.Context) ([]*backend.ModelArtifact, error)

List provides a mock function with given fields: ctx

func (*Backend) Login

func (_m *Backend) Login(ctx context.Context, registry string, username string, password string, cfg *config.Login) error

Login provides a mock function with given fields: ctx, registry, username, password, cfg

func (*Backend) Logout

func (_m *Backend) Logout(ctx context.Context, registry string) error

Logout provides a mock function with given fields: ctx, registry

func (*Backend) Prune

func (_m *Backend) Prune(ctx context.Context, dryRun bool, removeUntagged bool) error

Prune provides a mock function with given fields: ctx, dryRun, removeUntagged

func (*Backend) Pull

func (_m *Backend) Pull(ctx context.Context, target string, cfg *config.Pull) error

Pull provides a mock function with given fields: ctx, target, cfg

func (*Backend) Push

func (_m *Backend) Push(ctx context.Context, target string, cfg *config.Push) error

Push provides a mock function with given fields: ctx, target, cfg

func (*Backend) Remove

func (_m *Backend) Remove(ctx context.Context, target string) (string, error)

Remove provides a mock function with given fields: ctx, target

func (*Backend) Tag

func (_m *Backend) Tag(ctx context.Context, source string, target string) error

Tag provides a mock function with given fields: ctx, source, target

func (*Backend) Upload

func (_m *Backend) Upload(ctx context.Context, filepath string, cfg *config.Upload) error

Upload provides a mock function with given fields: ctx, filepath, cfg

type Backend_Attach_Call

type Backend_Attach_Call struct {
	*mock.Call
}

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

func (*Backend_Attach_Call) Return

func (*Backend_Attach_Call) Run

func (_c *Backend_Attach_Call) Run(run func(ctx context.Context, filepath string, cfg *config.Attach)) *Backend_Attach_Call

func (*Backend_Attach_Call) RunAndReturn

type Backend_Build_Call

type Backend_Build_Call struct {
	*mock.Call
}

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

func (*Backend_Build_Call) Return

func (_c *Backend_Build_Call) Return(_a0 error) *Backend_Build_Call

func (*Backend_Build_Call) Run

func (_c *Backend_Build_Call) Run(run func(ctx context.Context, modelfilePath string, workDir string, target string, cfg *config.Build)) *Backend_Build_Call

func (*Backend_Build_Call) RunAndReturn

type Backend_Expecter

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

func (*Backend_Expecter) Attach

func (_e *Backend_Expecter) Attach(ctx interface{}, filepath interface{}, cfg interface{}) *Backend_Attach_Call

Attach is a helper method to define mock.On call

  • ctx context.Context
  • filepath string
  • cfg *config.Attach

func (*Backend_Expecter) Build

func (_e *Backend_Expecter) Build(ctx interface{}, modelfilePath interface{}, workDir interface{}, target interface{}, cfg interface{}) *Backend_Build_Call

Build is a helper method to define mock.On call

  • ctx context.Context
  • modelfilePath string
  • workDir string
  • target string
  • cfg *config.Build

func (*Backend_Expecter) Extract

func (_e *Backend_Expecter) Extract(ctx interface{}, target interface{}, cfg interface{}) *Backend_Extract_Call

Extract is a helper method to define mock.On call

  • ctx context.Context
  • target string
  • cfg *config.Extract

func (*Backend_Expecter) Fetch

func (_e *Backend_Expecter) Fetch(ctx interface{}, target interface{}, cfg interface{}) *Backend_Fetch_Call

Fetch is a helper method to define mock.On call

  • ctx context.Context
  • target string
  • cfg *config.Fetch

func (*Backend_Expecter) Inspect

func (_e *Backend_Expecter) Inspect(ctx interface{}, target interface{}, cfg interface{}) *Backend_Inspect_Call

Inspect is a helper method to define mock.On call

  • ctx context.Context
  • target string
  • cfg *config.Inspect

func (*Backend_Expecter) List

func (_e *Backend_Expecter) List(ctx interface{}) *Backend_List_Call

List is a helper method to define mock.On call

  • ctx context.Context

func (*Backend_Expecter) Login

func (_e *Backend_Expecter) Login(ctx interface{}, registry interface{}, username interface{}, password interface{}, cfg interface{}) *Backend_Login_Call

Login is a helper method to define mock.On call

  • ctx context.Context
  • registry string
  • username string
  • password string
  • cfg *config.Login

func (*Backend_Expecter) Logout

func (_e *Backend_Expecter) Logout(ctx interface{}, registry interface{}) *Backend_Logout_Call

Logout is a helper method to define mock.On call

  • ctx context.Context
  • registry string

func (*Backend_Expecter) Prune

func (_e *Backend_Expecter) Prune(ctx interface{}, dryRun interface{}, removeUntagged interface{}) *Backend_Prune_Call

Prune is a helper method to define mock.On call

  • ctx context.Context
  • dryRun bool
  • removeUntagged bool

func (*Backend_Expecter) Pull

func (_e *Backend_Expecter) Pull(ctx interface{}, target interface{}, cfg interface{}) *Backend_Pull_Call

Pull is a helper method to define mock.On call

  • ctx context.Context
  • target string
  • cfg *config.Pull

func (*Backend_Expecter) Push

func (_e *Backend_Expecter) Push(ctx interface{}, target interface{}, cfg interface{}) *Backend_Push_Call

Push is a helper method to define mock.On call

  • ctx context.Context
  • target string
  • cfg *config.Push

func (*Backend_Expecter) Remove

func (_e *Backend_Expecter) Remove(ctx interface{}, target interface{}) *Backend_Remove_Call

Remove is a helper method to define mock.On call

  • ctx context.Context
  • target string

func (*Backend_Expecter) Tag

func (_e *Backend_Expecter) Tag(ctx interface{}, source interface{}, target interface{}) *Backend_Tag_Call

Tag is a helper method to define mock.On call

  • ctx context.Context
  • source string
  • target string

func (*Backend_Expecter) Upload

func (_e *Backend_Expecter) Upload(ctx interface{}, filepath interface{}, cfg interface{}) *Backend_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • filepath string
  • cfg *config.Upload

type Backend_Extract_Call

type Backend_Extract_Call struct {
	*mock.Call
}

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

func (*Backend_Extract_Call) Return

func (*Backend_Extract_Call) Run

func (_c *Backend_Extract_Call) Run(run func(ctx context.Context, target string, cfg *config.Extract)) *Backend_Extract_Call

func (*Backend_Extract_Call) RunAndReturn

type Backend_Fetch_Call

type Backend_Fetch_Call struct {
	*mock.Call
}

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

func (*Backend_Fetch_Call) Return

func (_c *Backend_Fetch_Call) Return(_a0 error) *Backend_Fetch_Call

func (*Backend_Fetch_Call) Run

func (_c *Backend_Fetch_Call) Run(run func(ctx context.Context, target string, cfg *config.Fetch)) *Backend_Fetch_Call

func (*Backend_Fetch_Call) RunAndReturn

func (_c *Backend_Fetch_Call) RunAndReturn(run func(context.Context, string, *config.Fetch) error) *Backend_Fetch_Call

type Backend_Inspect_Call

type Backend_Inspect_Call struct {
	*mock.Call
}

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

func (*Backend_Inspect_Call) Return

func (_c *Backend_Inspect_Call) Return(_a0 interface{}, _a1 error) *Backend_Inspect_Call

func (*Backend_Inspect_Call) Run

func (_c *Backend_Inspect_Call) Run(run func(ctx context.Context, target string, cfg *config.Inspect)) *Backend_Inspect_Call

func (*Backend_Inspect_Call) RunAndReturn

func (_c *Backend_Inspect_Call) RunAndReturn(run func(context.Context, string, *config.Inspect) (interface{}, error)) *Backend_Inspect_Call

type Backend_List_Call

type Backend_List_Call struct {
	*mock.Call
}

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

func (*Backend_List_Call) Return

func (*Backend_List_Call) Run

func (_c *Backend_List_Call) Run(run func(ctx context.Context)) *Backend_List_Call

func (*Backend_List_Call) RunAndReturn

func (_c *Backend_List_Call) RunAndReturn(run func(context.Context) ([]*backend.ModelArtifact, error)) *Backend_List_Call

type Backend_Login_Call

type Backend_Login_Call struct {
	*mock.Call
}

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

func (*Backend_Login_Call) Return

func (_c *Backend_Login_Call) Return(_a0 error) *Backend_Login_Call

func (*Backend_Login_Call) Run

func (_c *Backend_Login_Call) Run(run func(ctx context.Context, registry string, username string, password string, cfg *config.Login)) *Backend_Login_Call

func (*Backend_Login_Call) RunAndReturn

type Backend_Logout_Call

type Backend_Logout_Call struct {
	*mock.Call
}

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

func (*Backend_Logout_Call) Return

func (*Backend_Logout_Call) Run

func (_c *Backend_Logout_Call) Run(run func(ctx context.Context, registry string)) *Backend_Logout_Call

func (*Backend_Logout_Call) RunAndReturn

func (_c *Backend_Logout_Call) RunAndReturn(run func(context.Context, string) error) *Backend_Logout_Call

type Backend_Prune_Call

type Backend_Prune_Call struct {
	*mock.Call
}

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

func (*Backend_Prune_Call) Return

func (_c *Backend_Prune_Call) Return(_a0 error) *Backend_Prune_Call

func (*Backend_Prune_Call) Run

func (_c *Backend_Prune_Call) Run(run func(ctx context.Context, dryRun bool, removeUntagged bool)) *Backend_Prune_Call

func (*Backend_Prune_Call) RunAndReturn

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

type Backend_Pull_Call

type Backend_Pull_Call struct {
	*mock.Call
}

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

func (*Backend_Pull_Call) Return

func (_c *Backend_Pull_Call) Return(_a0 error) *Backend_Pull_Call

func (*Backend_Pull_Call) Run

func (_c *Backend_Pull_Call) Run(run func(ctx context.Context, target string, cfg *config.Pull)) *Backend_Pull_Call

func (*Backend_Pull_Call) RunAndReturn

func (_c *Backend_Pull_Call) RunAndReturn(run func(context.Context, string, *config.Pull) error) *Backend_Pull_Call

type Backend_Push_Call

type Backend_Push_Call struct {
	*mock.Call
}

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

func (*Backend_Push_Call) Return

func (_c *Backend_Push_Call) Return(_a0 error) *Backend_Push_Call

func (*Backend_Push_Call) Run

func (_c *Backend_Push_Call) Run(run func(ctx context.Context, target string, cfg *config.Push)) *Backend_Push_Call

func (*Backend_Push_Call) RunAndReturn

func (_c *Backend_Push_Call) RunAndReturn(run func(context.Context, string, *config.Push) error) *Backend_Push_Call

type Backend_Remove_Call

type Backend_Remove_Call struct {
	*mock.Call
}

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

func (*Backend_Remove_Call) Return

func (_c *Backend_Remove_Call) Return(_a0 string, _a1 error) *Backend_Remove_Call

func (*Backend_Remove_Call) Run

func (_c *Backend_Remove_Call) Run(run func(ctx context.Context, target string)) *Backend_Remove_Call

func (*Backend_Remove_Call) RunAndReturn

func (_c *Backend_Remove_Call) RunAndReturn(run func(context.Context, string) (string, error)) *Backend_Remove_Call

type Backend_Tag_Call

type Backend_Tag_Call struct {
	*mock.Call
}

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

func (*Backend_Tag_Call) Return

func (_c *Backend_Tag_Call) Return(_a0 error) *Backend_Tag_Call

func (*Backend_Tag_Call) Run

func (_c *Backend_Tag_Call) Run(run func(ctx context.Context, source string, target string)) *Backend_Tag_Call

func (*Backend_Tag_Call) RunAndReturn

func (_c *Backend_Tag_Call) RunAndReturn(run func(context.Context, string, string) error) *Backend_Tag_Call

type Backend_Upload_Call

type Backend_Upload_Call struct {
	*mock.Call
}

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

func (*Backend_Upload_Call) Return

func (*Backend_Upload_Call) Run

func (_c *Backend_Upload_Call) Run(run func(ctx context.Context, filepath string, cfg *config.Upload)) *Backend_Upload_Call

func (*Backend_Upload_Call) RunAndReturn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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