mocks

package
v0.94.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthnService

type AuthnService struct {
	mock.Mock
}

AuthnService is an autogenerated mock type for the AuthnService type

func NewAuthnService

func NewAuthnService(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthnService

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

func (_m *AuthnService) EXPECT() *AuthnService_Expecter

func (*AuthnService) GetPrincipal

GetPrincipal provides a mock function with given fields: ctx, via

type AuthnService_Expecter

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

func (*AuthnService_Expecter) GetPrincipal

func (_e *AuthnService_Expecter) GetPrincipal(ctx interface{}, via ...interface{}) *AuthnService_GetPrincipal_Call

GetPrincipal is a helper method to define mock.On call

  • ctx context.Context
  • via ...authenticate.ClientAssertion

type AuthnService_GetPrincipal_Call

type AuthnService_GetPrincipal_Call struct {
	*mock.Call
}

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

func (*AuthnService_GetPrincipal_Call) Return

func (*AuthnService_GetPrincipal_Call) Run

func (*AuthnService_GetPrincipal_Call) RunAndReturn

type ConfigRepository

type ConfigRepository struct {
	mock.Mock
}

ConfigRepository is an autogenerated mock type for the ConfigRepository type

func NewConfigRepository

func NewConfigRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *ConfigRepository

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

func (*ConfigRepository) GetAll

func (_m *ConfigRepository) GetAll(ctx context.Context) ([]resource.YAML, error)

GetAll provides a mock function with given fields: ctx

type ConfigRepository_Expecter

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

func (*ConfigRepository_Expecter) GetAll

func (_e *ConfigRepository_Expecter) GetAll(ctx interface{}) *ConfigRepository_GetAll_Call

GetAll is a helper method to define mock.On call

  • ctx context.Context

type ConfigRepository_GetAll_Call

type ConfigRepository_GetAll_Call struct {
	*mock.Call
}

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

func (*ConfigRepository_GetAll_Call) Return

func (*ConfigRepository_GetAll_Call) Run

func (*ConfigRepository_GetAll_Call) RunAndReturn

type OrgService

type OrgService struct {
	mock.Mock
}

OrgService is an autogenerated mock type for the OrgService type

func NewOrgService

func NewOrgService(t interface {
	mock.TestingT
	Cleanup(func())
}) *OrgService

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

func (_m *OrgService) EXPECT() *OrgService_Expecter

func (*OrgService) Get

func (_m *OrgService) Get(ctx context.Context, idOrName string) (organization.Organization, error)

Get provides a mock function with given fields: ctx, idOrName

type OrgService_Expecter

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

func (*OrgService_Expecter) Get

func (_e *OrgService_Expecter) Get(ctx interface{}, idOrName interface{}) *OrgService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • idOrName string

type OrgService_Get_Call

type OrgService_Get_Call struct {
	*mock.Call
}

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

func (*OrgService_Get_Call) Return

func (*OrgService_Get_Call) Run

func (_c *OrgService_Get_Call) Run(run func(ctx context.Context, idOrName string)) *OrgService_Get_Call

func (*OrgService_Get_Call) RunAndReturn

type PATService

type PATService struct {
	mock.Mock
}

PATService is an autogenerated mock type for the PATService type

func NewPATService

func NewPATService(t interface {
	mock.TestingT
	Cleanup(func())
}) *PATService

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

func (_m *PATService) EXPECT() *PATService_Expecter

func (*PATService) GetByID

func (_m *PATService) GetByID(ctx context.Context, id string) (models.PAT, error)

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

type PATService_Expecter

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

func (*PATService_Expecter) GetByID

func (_e *PATService_Expecter) GetByID(ctx interface{}, id interface{}) *PATService_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id string

type PATService_GetByID_Call

type PATService_GetByID_Call struct {
	*mock.Call
}

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

func (*PATService_GetByID_Call) Return

func (*PATService_GetByID_Call) Run

func (*PATService_GetByID_Call) RunAndReturn

type ProjectService

type ProjectService struct {
	mock.Mock
}

ProjectService is an autogenerated mock type for the ProjectService type

func NewProjectService

func NewProjectService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ProjectService

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

func (*ProjectService) Get

func (_m *ProjectService) Get(ctx context.Context, idOrName string) (project.Project, error)

Get provides a mock function with given fields: ctx, idOrName

type ProjectService_Expecter

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

func (*ProjectService_Expecter) Get

func (_e *ProjectService_Expecter) Get(ctx interface{}, idOrName interface{}) *ProjectService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • idOrName string

type ProjectService_Get_Call

type ProjectService_Get_Call struct {
	*mock.Call
}

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

func (*ProjectService_Get_Call) Return

func (*ProjectService_Get_Call) Run

func (_c *ProjectService_Get_Call) Run(run func(ctx context.Context, idOrName string)) *ProjectService_Get_Call

func (*ProjectService_Get_Call) RunAndReturn

type RelationService

type RelationService struct {
	mock.Mock
}

RelationService is an autogenerated mock type for the RelationService type

func NewRelationService

func NewRelationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RelationService

NewRelationService creates a new instance of RelationService. 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 (*RelationService) BatchCheckPermission

func (_m *RelationService) BatchCheckPermission(ctx context.Context, relations []relation.Relation) ([]relation.CheckPair, error)

BatchCheckPermission provides a mock function with given fields: ctx, relations

func (*RelationService) CheckPermission

func (_m *RelationService) CheckPermission(ctx context.Context, rel relation.Relation) (bool, error)

CheckPermission provides a mock function with given fields: ctx, rel

func (*RelationService) Create

Create provides a mock function with given fields: ctx, rel

func (*RelationService) Delete

func (_m *RelationService) Delete(ctx context.Context, rel relation.Relation) error

Delete provides a mock function with given fields: ctx, rel

func (*RelationService) EXPECT

type RelationService_BatchCheckPermission_Call

type RelationService_BatchCheckPermission_Call struct {
	*mock.Call
}

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

func (*RelationService_BatchCheckPermission_Call) Return

func (*RelationService_BatchCheckPermission_Call) Run

func (*RelationService_BatchCheckPermission_Call) RunAndReturn

type RelationService_CheckPermission_Call

type RelationService_CheckPermission_Call struct {
	*mock.Call
}

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

func (*RelationService_CheckPermission_Call) Return

func (*RelationService_CheckPermission_Call) Run

func (*RelationService_CheckPermission_Call) RunAndReturn

type RelationService_Create_Call

type RelationService_Create_Call struct {
	*mock.Call
}

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

func (*RelationService_Create_Call) Return

func (*RelationService_Create_Call) Run

func (*RelationService_Create_Call) RunAndReturn

type RelationService_Delete_Call

type RelationService_Delete_Call struct {
	*mock.Call
}

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

func (*RelationService_Delete_Call) Return

func (*RelationService_Delete_Call) Run

func (*RelationService_Delete_Call) RunAndReturn

type RelationService_Expecter

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

func (*RelationService_Expecter) BatchCheckPermission

func (_e *RelationService_Expecter) BatchCheckPermission(ctx interface{}, relations interface{}) *RelationService_BatchCheckPermission_Call

BatchCheckPermission is a helper method to define mock.On call

  • ctx context.Context
  • relations []relation.Relation

func (*RelationService_Expecter) CheckPermission

func (_e *RelationService_Expecter) CheckPermission(ctx interface{}, rel interface{}) *RelationService_CheckPermission_Call

CheckPermission is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

func (*RelationService_Expecter) Create

func (_e *RelationService_Expecter) Create(ctx interface{}, rel interface{}) *RelationService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

func (*RelationService_Expecter) Delete

func (_e *RelationService_Expecter) Delete(ctx interface{}, rel interface{}) *RelationService_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • rel relation.Relation

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) Create

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

func (*Repository) Delete

func (_m *Repository) Delete(ctx context.Context, id string) error

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

func (*Repository) EXPECT

func (_m *Repository) EXPECT() *Repository_Expecter

func (*Repository) GetByID

func (_m *Repository) GetByID(ctx context.Context, id string) (resource.Resource, error)

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

func (*Repository) GetByURN

func (_m *Repository) GetByURN(ctx context.Context, urn string) (resource.Resource, error)

GetByURN provides a mock function with given fields: ctx, urn

func (*Repository) List

func (_m *Repository) List(ctx context.Context, flt resource.Filter) ([]resource.Resource, error)

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

func (*Repository) Update

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

type Repository_Create_Call

type Repository_Create_Call struct {
	*mock.Call
}

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

func (*Repository_Create_Call) Return

func (*Repository_Create_Call) Run

func (*Repository_Create_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_Expecter

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

func (*Repository_Expecter) Create

func (_e *Repository_Expecter) Create(ctx interface{}, _a1 interface{}) *Repository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • _a1 resource.Resource

func (*Repository_Expecter) Delete

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

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Repository_Expecter) GetByID

func (_e *Repository_Expecter) GetByID(ctx interface{}, id interface{}) *Repository_GetByID_Call

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*Repository_Expecter) GetByURN

func (_e *Repository_Expecter) GetByURN(ctx interface{}, urn interface{}) *Repository_GetByURN_Call

GetByURN is a helper method to define mock.On call

  • ctx context.Context
  • urn string

func (*Repository_Expecter) List

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

List is a helper method to define mock.On call

  • ctx context.Context
  • flt resource.Filter

func (*Repository_Expecter) Update

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

Update is a helper method to define mock.On call

  • ctx context.Context
  • _a1 resource.Resource

type Repository_GetByID_Call

type Repository_GetByID_Call struct {
	*mock.Call
}

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

func (*Repository_GetByID_Call) Return

func (*Repository_GetByID_Call) Run

func (*Repository_GetByID_Call) RunAndReturn

type Repository_GetByURN_Call

type Repository_GetByURN_Call struct {
	*mock.Call
}

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

func (*Repository_GetByURN_Call) Return

func (*Repository_GetByURN_Call) Run

func (*Repository_GetByURN_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 (*Repository_List_Call) Run

func (*Repository_List_Call) RunAndReturn

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