mocks

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 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 Repository

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository

func NewRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *Repository

NewRepository creates a new instance of Repository. 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 (*Repository) AttachRegistry

func (_m *Repository) AttachRegistry(ctx context.Context, roleID ids.ID[ids.RoleKind], registryID ids.ID[ids.RegistryKind]) error

AttachRegistry provides a mock function with given fields: ctx, roleID, registryID

func (*Repository) Delete

func (_m *Repository) Delete(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], id ids.ID[ids.RoleKind]) error

Delete provides a mock function with given fields: ctx, gatewayID, id

func (*Repository) DetachRegistry

func (_m *Repository) DetachRegistry(ctx context.Context, roleID ids.ID[ids.RoleKind], registryID ids.ID[ids.RegistryKind]) error

DetachRegistry provides a mock function with given fields: ctx, roleID, registryID

func (*Repository) DetachRegistryIfUnreferenced

func (_m *Repository) DetachRegistryIfUnreferenced(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], roleID ids.ID[ids.RoleKind], registryID ids.ID[ids.RegistryKind]) (*role.Role, error)

DetachRegistryIfUnreferenced provides a mock function with given fields: ctx, gatewayID, roleID, registryID

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) FindByID

func (_m *Repository) FindByID(ctx context.Context, id ids.ID[ids.RoleKind]) (*role.Role, error)

FindByID provides a mock function with given fields: ctx, id

func (*Repository) FindByIDs

func (_m *Repository) FindByIDs(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], roleIDs []ids.ID[ids.RoleKind]) ([]*role.Role, error)

FindByIDs provides a mock function with given fields: ctx, gatewayID, roleIDs

func (*Repository) List

func (_m *Repository) List(ctx context.Context, filter role.ListFilter) ([]*role.Role, int, error)

List provides a mock function with given fields: ctx, filter

func (*Repository) ListByGateway

func (_m *Repository) ListByGateway(ctx context.Context, gatewayID ids.ID[ids.GatewayKind]) ([]*role.Role, error)

ListByGateway provides a mock function with given fields: ctx, gatewayID

func (*Repository) Save

func (_m *Repository) Save(ctx context.Context, r *role.Role) error

Save provides a mock function with given fields: ctx, r

func (*Repository) Update

func (_m *Repository) Update(ctx context.Context, r *role.Role) error

Update provides a mock function with given fields: ctx, r

type Repository_AttachRegistry_Call

type Repository_AttachRegistry_Call struct {
	*mock.Call
}

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

func (*Repository_AttachRegistry_Call) Return

func (*Repository_AttachRegistry_Call) Run

func (*Repository_AttachRegistry_Call) RunAndReturn

type Repository_Delete_Call

type Repository_Delete_Call struct {
	*mock.Call
}

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

func (*Repository_Delete_Call) Return

func (*Repository_Delete_Call) Run

func (*Repository_Delete_Call) RunAndReturn

type Repository_DetachRegistryIfUnreferenced_Call

type Repository_DetachRegistryIfUnreferenced_Call struct {
	*mock.Call
}

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

func (*Repository_DetachRegistryIfUnreferenced_Call) Return

func (*Repository_DetachRegistryIfUnreferenced_Call) Run

type Repository_DetachRegistry_Call

type Repository_DetachRegistry_Call struct {
	*mock.Call
}

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

func (*Repository_DetachRegistry_Call) Return

func (*Repository_DetachRegistry_Call) Run

func (*Repository_DetachRegistry_Call) RunAndReturn

type Repository_Expecter

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

func (*Repository_Expecter) AttachRegistry

func (_e *Repository_Expecter) AttachRegistry(ctx interface{}, roleID interface{}, registryID interface{}) *Repository_AttachRegistry_Call

AttachRegistry is a helper method to define mock.On call

  • ctx context.Context
  • roleID ids.ID[ids.RoleKind]
  • registryID ids.ID[ids.RegistryKind]

func (*Repository_Expecter) Delete

func (_e *Repository_Expecter) Delete(ctx interface{}, gatewayID interface{}, id interface{}) *Repository_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]
  • id ids.ID[ids.RoleKind]

func (*Repository_Expecter) DetachRegistry

func (_e *Repository_Expecter) DetachRegistry(ctx interface{}, roleID interface{}, registryID interface{}) *Repository_DetachRegistry_Call

DetachRegistry is a helper method to define mock.On call

  • ctx context.Context
  • roleID ids.ID[ids.RoleKind]
  • registryID ids.ID[ids.RegistryKind]

func (*Repository_Expecter) DetachRegistryIfUnreferenced

func (_e *Repository_Expecter) DetachRegistryIfUnreferenced(ctx interface{}, gatewayID interface{}, roleID interface{}, registryID interface{}) *Repository_DetachRegistryIfUnreferenced_Call

DetachRegistryIfUnreferenced is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]
  • roleID ids.ID[ids.RoleKind]
  • registryID ids.ID[ids.RegistryKind]

func (*Repository_Expecter) FindByID

func (_e *Repository_Expecter) FindByID(ctx interface{}, id interface{}) *Repository_FindByID_Call

FindByID is a helper method to define mock.On call

  • ctx context.Context
  • id ids.ID[ids.RoleKind]

func (*Repository_Expecter) FindByIDs

func (_e *Repository_Expecter) FindByIDs(ctx interface{}, gatewayID interface{}, roleIDs interface{}) *Repository_FindByIDs_Call

FindByIDs is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]
  • roleIDs []ids.ID[ids.RoleKind]

func (*Repository_Expecter) List

func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • filter role.ListFilter

func (*Repository_Expecter) ListByGateway

func (_e *Repository_Expecter) ListByGateway(ctx interface{}, gatewayID interface{}) *Repository_ListByGateway_Call

ListByGateway is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]

func (*Repository_Expecter) Save

func (_e *Repository_Expecter) Save(ctx interface{}, r interface{}) *Repository_Save_Call

Save is a helper method to define mock.On call

  • ctx context.Context
  • r *role.Role

func (*Repository_Expecter) Update

func (_e *Repository_Expecter) Update(ctx interface{}, r interface{}) *Repository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • r *role.Role

type Repository_FindByID_Call

type Repository_FindByID_Call struct {
	*mock.Call
}

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

func (*Repository_FindByID_Call) Return

func (*Repository_FindByID_Call) Run

func (*Repository_FindByID_Call) RunAndReturn

type Repository_FindByIDs_Call

type Repository_FindByIDs_Call struct {
	*mock.Call
}

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

func (*Repository_FindByIDs_Call) Return

func (*Repository_FindByIDs_Call) Run

func (_c *Repository_FindByIDs_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], roleIDs []ids.ID[ids.RoleKind])) *Repository_FindByIDs_Call

func (*Repository_FindByIDs_Call) RunAndReturn

type Repository_ListByGateway_Call

type Repository_ListByGateway_Call struct {
	*mock.Call
}

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

func (*Repository_ListByGateway_Call) Return

func (*Repository_ListByGateway_Call) Run

func (*Repository_ListByGateway_Call) RunAndReturn

type Repository_List_Call

type Repository_List_Call struct {
	*mock.Call
}

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

func (*Repository_List_Call) Return

func (_c *Repository_List_Call) Return(items []*role.Role, total int, err error) *Repository_List_Call

func (*Repository_List_Call) Run

func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter role.ListFilter)) *Repository_List_Call

func (*Repository_List_Call) RunAndReturn

type Repository_Save_Call

type Repository_Save_Call struct {
	*mock.Call
}

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

func (*Repository_Save_Call) Return

func (*Repository_Save_Call) Run

func (_c *Repository_Save_Call) Run(run func(ctx context.Context, r *role.Role)) *Repository_Save_Call

func (*Repository_Save_Call) RunAndReturn

func (_c *Repository_Save_Call) RunAndReturn(run func(context.Context, *role.Role) error) *Repository_Save_Call

type Repository_Update_Call

type Repository_Update_Call struct {
	*mock.Call
}

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

func (*Repository_Update_Call) Return

func (*Repository_Update_Call) Run

func (*Repository_Update_Call) RunAndReturn

Jump to

Keyboard shortcuts

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