mocks

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceService

type NamespaceService struct {
	mock.Mock
}

NamespaceService is an autogenerated mock type for the NamespaceService type

func NewNamespaceService

func NewNamespaceService(t interface {
	mock.TestingT
	Cleanup(func())
}) *NamespaceService

NewNamespaceService creates a new instance of NamespaceService. 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 (*NamespaceService) Create

func (_m *NamespaceService) Create(_a0 context.Context, _a1 *namespace.Namespace) error

Create provides a mock function with given fields: _a0, _a1

func (*NamespaceService) Delete

func (_m *NamespaceService) Delete(_a0 context.Context, _a1 uint64) error

Delete provides a mock function with given fields: _a0, _a1

func (*NamespaceService) EXPECT

func (*NamespaceService) Get

Get provides a mock function with given fields: _a0, _a1

func (*NamespaceService) List

List provides a mock function with given fields: _a0

func (*NamespaceService) Update

func (_m *NamespaceService) Update(_a0 context.Context, _a1 *namespace.Namespace) error

Update provides a mock function with given fields: _a0, _a1

type NamespaceService_Create_Call

type NamespaceService_Create_Call struct {
	*mock.Call
}

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

func (*NamespaceService_Create_Call) Return

func (*NamespaceService_Create_Call) Run

func (*NamespaceService_Create_Call) RunAndReturn added in v0.6.1

type NamespaceService_Delete_Call

type NamespaceService_Delete_Call struct {
	*mock.Call
}

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

func (*NamespaceService_Delete_Call) Return

func (*NamespaceService_Delete_Call) Run

func (*NamespaceService_Delete_Call) RunAndReturn added in v0.6.1

type NamespaceService_Expecter

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

func (*NamespaceService_Expecter) Create

func (_e *NamespaceService_Expecter) Create(_a0 interface{}, _a1 interface{}) *NamespaceService_Create_Call

Create is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *namespace.Namespace

func (*NamespaceService_Expecter) Delete

func (_e *NamespaceService_Expecter) Delete(_a0 interface{}, _a1 interface{}) *NamespaceService_Delete_Call

Delete is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 uint64

func (*NamespaceService_Expecter) Get

func (_e *NamespaceService_Expecter) Get(_a0 interface{}, _a1 interface{}) *NamespaceService_Get_Call

Get is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 uint64

func (*NamespaceService_Expecter) List

func (_e *NamespaceService_Expecter) List(_a0 interface{}) *NamespaceService_List_Call

List is a helper method to define mock.On call

  • _a0 context.Context

func (*NamespaceService_Expecter) Update

func (_e *NamespaceService_Expecter) Update(_a0 interface{}, _a1 interface{}) *NamespaceService_Update_Call

Update is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *namespace.Namespace

type NamespaceService_Get_Call

type NamespaceService_Get_Call struct {
	*mock.Call
}

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

func (*NamespaceService_Get_Call) Return

func (*NamespaceService_Get_Call) Run

func (*NamespaceService_Get_Call) RunAndReturn added in v0.6.1

type NamespaceService_List_Call

type NamespaceService_List_Call struct {
	*mock.Call
}

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

func (*NamespaceService_List_Call) Return

func (*NamespaceService_List_Call) Run

func (*NamespaceService_List_Call) RunAndReturn added in v0.6.1

type NamespaceService_Update_Call

type NamespaceService_Update_Call struct {
	*mock.Call
}

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

func (*NamespaceService_Update_Call) Return

func (*NamespaceService_Update_Call) Run

func (*NamespaceService_Update_Call) RunAndReturn added in v0.6.1

type Repository added in v0.6.12

type Repository struct {
	mock.Mock
}

Repository is an autogenerated mock type for the Repository type

func NewRepository added in v0.6.12

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) Commit added in v0.6.12

func (_m *Repository) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*Repository) EXPECT added in v0.6.12

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) List added in v0.6.12

func (_m *Repository) List(_a0 context.Context, _a1 rule.Filter) ([]rule.Rule, error)

List provides a mock function with given fields: _a0, _a1

func (*Repository) Rollback added in v0.6.12

func (_m *Repository) Rollback(ctx context.Context, err error) error

Rollback provides a mock function with given fields: ctx, err

func (*Repository) Upsert added in v0.6.12

func (_m *Repository) Upsert(_a0 context.Context, _a1 *rule.Rule) error

Upsert provides a mock function with given fields: _a0, _a1

func (*Repository) WithTransaction added in v0.6.12

func (_m *Repository) WithTransaction(ctx context.Context) context.Context

WithTransaction provides a mock function with given fields: ctx

type Repository_Commit_Call added in v0.6.12

type Repository_Commit_Call struct {
	*mock.Call
}

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

func (*Repository_Commit_Call) Return added in v0.6.12

func (*Repository_Commit_Call) Run added in v0.6.12

func (*Repository_Commit_Call) RunAndReturn added in v0.6.12

func (_c *Repository_Commit_Call) RunAndReturn(run func(context.Context) error) *Repository_Commit_Call

type Repository_Expecter added in v0.6.12

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

func (*Repository_Expecter) Commit added in v0.6.12

func (_e *Repository_Expecter) Commit(ctx interface{}) *Repository_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Repository_Expecter) List added in v0.6.12

func (_e *Repository_Expecter) List(_a0 interface{}, _a1 interface{}) *Repository_List_Call

List is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 rule.Filter

func (*Repository_Expecter) Rollback added in v0.6.12

func (_e *Repository_Expecter) Rollback(ctx interface{}, err interface{}) *Repository_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context
  • err error

func (*Repository_Expecter) Upsert added in v0.6.12

func (_e *Repository_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *Repository_Upsert_Call

Upsert is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *rule.Rule

func (*Repository_Expecter) WithTransaction added in v0.6.12

func (_e *Repository_Expecter) WithTransaction(ctx interface{}) *Repository_WithTransaction_Call

WithTransaction is a helper method to define mock.On call

  • ctx context.Context

type Repository_List_Call added in v0.6.12

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 added in v0.6.12

func (_c *Repository_List_Call) Return(_a0 []rule.Rule, _a1 error) *Repository_List_Call

func (*Repository_List_Call) Run added in v0.6.12

func (_c *Repository_List_Call) Run(run func(_a0 context.Context, _a1 rule.Filter)) *Repository_List_Call

func (*Repository_List_Call) RunAndReturn added in v0.6.12

func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, rule.Filter) ([]rule.Rule, error)) *Repository_List_Call

type Repository_Rollback_Call added in v0.6.12

type Repository_Rollback_Call struct {
	*mock.Call
}

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

func (*Repository_Rollback_Call) Return added in v0.6.12

func (*Repository_Rollback_Call) Run added in v0.6.12

func (*Repository_Rollback_Call) RunAndReturn added in v0.6.12

type Repository_Upsert_Call added in v0.6.12

type Repository_Upsert_Call struct {
	*mock.Call
}

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

func (*Repository_Upsert_Call) Return added in v0.6.12

func (*Repository_Upsert_Call) Run added in v0.6.12

func (_c *Repository_Upsert_Call) Run(run func(_a0 context.Context, _a1 *rule.Rule)) *Repository_Upsert_Call

func (*Repository_Upsert_Call) RunAndReturn added in v0.6.12

type Repository_WithTransaction_Call added in v0.6.12

type Repository_WithTransaction_Call struct {
	*mock.Call
}

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

func (*Repository_WithTransaction_Call) Return added in v0.6.12

func (*Repository_WithTransaction_Call) Run added in v0.6.12

func (*Repository_WithTransaction_Call) RunAndReturn added in v0.6.12

type RuleUploader

type RuleUploader struct {
	mock.Mock
}

RuleUploader is an autogenerated mock type for the RuleUploader type

func NewRuleUploader

func NewRuleUploader(t interface {
	mock.TestingT
	Cleanup(func())
}) *RuleUploader

NewRuleUploader creates a new instance of RuleUploader. 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 (*RuleUploader) EXPECT

func (_m *RuleUploader) EXPECT() *RuleUploader_Expecter

func (*RuleUploader) UpsertRule

func (_m *RuleUploader) UpsertRule(ctx context.Context, ns namespace.Namespace, prov provider.Provider, rl *rule.Rule, templateToUpdate *template.Template) error

UpsertRule provides a mock function with given fields: ctx, ns, prov, rl, templateToUpdate

type RuleUploader_Expecter

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

func (*RuleUploader_Expecter) UpsertRule

func (_e *RuleUploader_Expecter) UpsertRule(ctx interface{}, ns interface{}, prov interface{}, rl interface{}, templateToUpdate interface{}) *RuleUploader_UpsertRule_Call

UpsertRule is a helper method to define mock.On call

  • ctx context.Context
  • ns namespace.Namespace
  • prov provider.Provider
  • rl *rule.Rule
  • templateToUpdate *template.Template

type RuleUploader_UpsertRule_Call

type RuleUploader_UpsertRule_Call struct {
	*mock.Call
}

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

func (*RuleUploader_UpsertRule_Call) Return

func (*RuleUploader_UpsertRule_Call) Run

func (*RuleUploader_UpsertRule_Call) RunAndReturn added in v0.6.1

type TemplateService

type TemplateService struct {
	mock.Mock
}

TemplateService is an autogenerated mock type for the TemplateService type

func NewTemplateService

func NewTemplateService(t interface {
	mock.TestingT
	Cleanup(func())
}) *TemplateService

NewTemplateService creates a new instance of TemplateService. 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 (*TemplateService) Delete

func (_m *TemplateService) Delete(_a0 context.Context, _a1 string) error

Delete provides a mock function with given fields: _a0, _a1

func (*TemplateService) EXPECT

func (*TemplateService) GetByName

func (_m *TemplateService) GetByName(_a0 context.Context, _a1 string) (*template.Template, error)

GetByName provides a mock function with given fields: _a0, _a1

func (*TemplateService) List

List provides a mock function with given fields: _a0, _a1

func (*TemplateService) Upsert

func (_m *TemplateService) Upsert(_a0 context.Context, _a1 *template.Template) error

Upsert provides a mock function with given fields: _a0, _a1

type TemplateService_Delete_Call

type TemplateService_Delete_Call struct {
	*mock.Call
}

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

func (*TemplateService_Delete_Call) Return

func (*TemplateService_Delete_Call) Run

func (*TemplateService_Delete_Call) RunAndReturn added in v0.6.1

type TemplateService_Expecter

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

func (*TemplateService_Expecter) Delete

func (_e *TemplateService_Expecter) Delete(_a0 interface{}, _a1 interface{}) *TemplateService_Delete_Call

Delete is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string

func (*TemplateService_Expecter) GetByName

func (_e *TemplateService_Expecter) GetByName(_a0 interface{}, _a1 interface{}) *TemplateService_GetByName_Call

GetByName is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string

func (*TemplateService_Expecter) List

func (_e *TemplateService_Expecter) List(_a0 interface{}, _a1 interface{}) *TemplateService_List_Call

List is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 template.Filter

func (*TemplateService_Expecter) Upsert

func (_e *TemplateService_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *TemplateService_Upsert_Call

Upsert is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *template.Template

type TemplateService_GetByName_Call

type TemplateService_GetByName_Call struct {
	*mock.Call
}

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

func (*TemplateService_GetByName_Call) Return

func (*TemplateService_GetByName_Call) Run

func (*TemplateService_GetByName_Call) RunAndReturn added in v0.6.1

type TemplateService_List_Call

type TemplateService_List_Call struct {
	*mock.Call
}

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

func (*TemplateService_List_Call) Return

func (*TemplateService_List_Call) Run

func (*TemplateService_List_Call) RunAndReturn added in v0.6.1

type TemplateService_Upsert_Call

type TemplateService_Upsert_Call struct {
	*mock.Call
}

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

func (*TemplateService_Upsert_Call) Return

func (*TemplateService_Upsert_Call) Run

func (*TemplateService_Upsert_Call) RunAndReturn added in v0.6.1

type Transactor added in v0.6.12

type Transactor struct {
	mock.Mock
}

Transactor is an autogenerated mock type for the Transactor type

func NewTransactor added in v0.6.12

func NewTransactor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transactor

NewTransactor creates a new instance of Transactor. 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 (*Transactor) Commit added in v0.6.12

func (_m *Transactor) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*Transactor) EXPECT added in v0.6.12

func (_m *Transactor) EXPECT() *Transactor_Expecter

func (*Transactor) Rollback added in v0.6.12

func (_m *Transactor) Rollback(ctx context.Context, err error) error

Rollback provides a mock function with given fields: ctx, err

func (*Transactor) WithTransaction added in v0.6.12

func (_m *Transactor) WithTransaction(ctx context.Context) context.Context

WithTransaction provides a mock function with given fields: ctx

type Transactor_Commit_Call added in v0.6.12

type Transactor_Commit_Call struct {
	*mock.Call
}

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

func (*Transactor_Commit_Call) Return added in v0.6.12

func (*Transactor_Commit_Call) Run added in v0.6.12

func (*Transactor_Commit_Call) RunAndReturn added in v0.6.12

func (_c *Transactor_Commit_Call) RunAndReturn(run func(context.Context) error) *Transactor_Commit_Call

type Transactor_Expecter added in v0.6.12

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

func (*Transactor_Expecter) Commit added in v0.6.12

func (_e *Transactor_Expecter) Commit(ctx interface{}) *Transactor_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Transactor_Expecter) Rollback added in v0.6.12

func (_e *Transactor_Expecter) Rollback(ctx interface{}, err interface{}) *Transactor_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context
  • err error

func (*Transactor_Expecter) WithTransaction added in v0.6.12

func (_e *Transactor_Expecter) WithTransaction(ctx interface{}) *Transactor_WithTransaction_Call

WithTransaction is a helper method to define mock.On call

  • ctx context.Context

type Transactor_Rollback_Call added in v0.6.12

type Transactor_Rollback_Call struct {
	*mock.Call
}

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

func (*Transactor_Rollback_Call) Return added in v0.6.12

func (*Transactor_Rollback_Call) Run added in v0.6.12

func (*Transactor_Rollback_Call) RunAndReturn added in v0.6.12

type Transactor_WithTransaction_Call added in v0.6.12

type Transactor_WithTransaction_Call struct {
	*mock.Call
}

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

func (*Transactor_WithTransaction_Call) Return added in v0.6.12

func (*Transactor_WithTransaction_Call) Run added in v0.6.12

func (*Transactor_WithTransaction_Call) RunAndReturn added in v0.6.12

Jump to

Keyboard shortcuts

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