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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditRecordRepository

type AuditRecordRepository struct {
	mock.Mock
}

AuditRecordRepository is an autogenerated mock type for the AuditRecordRepository type

func NewAuditRecordRepository

func NewAuditRecordRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuditRecordRepository

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

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

func (*AuditRecordRepository) EXPECT

type AuditRecordRepository_Create_Call

type AuditRecordRepository_Create_Call struct {
	*mock.Call
}

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

func (*AuditRecordRepository_Create_Call) Return

func (*AuditRecordRepository_Create_Call) Run

func (*AuditRecordRepository_Create_Call) RunAndReturn

type AuditRecordRepository_Expecter

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

func (*AuditRecordRepository_Expecter) Create

func (_e *AuditRecordRepository_Expecter) Create(ctx interface{}, auditRecord interface{}) *AuditRecordRepository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • auditRecord models.AuditRecord

type OrganizationService

type OrganizationService struct {
	mock.Mock
}

OrganizationService is an autogenerated mock type for the OrganizationService type

func NewOrganizationService

func NewOrganizationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *OrganizationService

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

func (*OrganizationService) GetRaw

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

type OrganizationService_Expecter

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

func (*OrganizationService_Expecter) GetRaw

func (_e *OrganizationService_Expecter) GetRaw(ctx interface{}, id interface{}) *OrganizationService_GetRaw_Call

GetRaw is a helper method to define mock.On call

  • ctx context.Context
  • id string

type OrganizationService_GetRaw_Call

type OrganizationService_GetRaw_Call struct {
	*mock.Call
}

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

func (*OrganizationService_GetRaw_Call) Return

func (*OrganizationService_GetRaw_Call) Run

func (*OrganizationService_GetRaw_Call) RunAndReturn

type PolicyService

type PolicyService struct {
	mock.Mock
}

PolicyService is an autogenerated mock type for the PolicyService type

func NewPolicyService

func NewPolicyService(t interface {
	mock.TestingT
	Cleanup(func())
}) *PolicyService

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

func (_m *PolicyService) Create(ctx context.Context, pol policy.Policy) (policy.Policy, error)

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

func (*PolicyService) Delete added in v0.94.0

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

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

func (*PolicyService) EXPECT

func (_m *PolicyService) EXPECT() *PolicyService_Expecter

func (*PolicyService) List added in v0.94.0

func (_m *PolicyService) List(ctx context.Context, flt policy.Filter) ([]policy.Policy, error)

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

type PolicyService_Create_Call

type PolicyService_Create_Call struct {
	*mock.Call
}

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

func (*PolicyService_Create_Call) Return

func (*PolicyService_Create_Call) Run

func (*PolicyService_Create_Call) RunAndReturn

type PolicyService_Delete_Call added in v0.94.0

type PolicyService_Delete_Call struct {
	*mock.Call
}

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

func (*PolicyService_Delete_Call) Return added in v0.94.0

func (*PolicyService_Delete_Call) Run added in v0.94.0

func (*PolicyService_Delete_Call) RunAndReturn added in v0.94.0

type PolicyService_Expecter

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

func (*PolicyService_Expecter) Create

func (_e *PolicyService_Expecter) Create(ctx interface{}, pol interface{}) *PolicyService_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • pol policy.Policy

func (*PolicyService_Expecter) Delete added in v0.94.0

func (_e *PolicyService_Expecter) Delete(ctx interface{}, id interface{}) *PolicyService_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*PolicyService_Expecter) List added in v0.94.0

func (_e *PolicyService_Expecter) List(ctx interface{}, flt interface{}) *PolicyService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • flt policy.Filter

type PolicyService_List_Call added in v0.94.0

type PolicyService_List_Call struct {
	*mock.Call
}

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

func (*PolicyService_List_Call) Return added in v0.94.0

func (*PolicyService_List_Call) Run added in v0.94.0

func (*PolicyService_List_Call) RunAndReturn added in v0.94.0

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

func (_m *Repository) CountActive(ctx context.Context, userID string, orgID string) (int64, error)

CountActive provides a mock function with given fields: ctx, userID, orgID

func (*Repository) Create

func (_m *Repository) Create(ctx context.Context, pat models.PAT) (models.PAT, error)

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

func (*Repository) Delete added in v0.94.0

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

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

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

func (*Repository) GetBySecretHash added in v0.93.2

func (_m *Repository) GetBySecretHash(ctx context.Context, secretHash string) (models.PAT, error)

GetBySecretHash provides a mock function with given fields: ctx, secretHash

func (*Repository) IsTitleAvailable added in v0.94.0

func (_m *Repository) IsTitleAvailable(ctx context.Context, userID string, orgID string, title string) (bool, error)

IsTitleAvailable provides a mock function with given fields: ctx, userID, orgID, title

func (*Repository) List added in v0.94.0

func (_m *Repository) List(ctx context.Context, userID string, orgID string, query *rql.Query) (models.PATList, error)

List provides a mock function with given fields: ctx, userID, orgID, query

func (*Repository) Regenerate added in v0.94.0

func (_m *Repository) Regenerate(ctx context.Context, id string, secretHash string, expiresAt time.Time) (models.PAT, error)

Regenerate provides a mock function with given fields: ctx, id, secretHash, expiresAt

func (*Repository) Update added in v0.94.0

func (_m *Repository) Update(ctx context.Context, pat models.PAT) (models.PAT, error)

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

func (*Repository) UpdateLastUsedAt added in v0.93.2

func (_m *Repository) UpdateLastUsedAt(ctx context.Context, id string, at time.Time) error

UpdateLastUsedAt provides a mock function with given fields: ctx, id, at

type Repository_CountActive_Call

type Repository_CountActive_Call struct {
	*mock.Call
}

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

func (*Repository_CountActive_Call) Return

func (*Repository_CountActive_Call) Run

func (*Repository_CountActive_Call) RunAndReturn

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

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

func (*Repository_Delete_Call) Run added in v0.94.0

func (*Repository_Delete_Call) RunAndReturn added in v0.94.0

type Repository_Expecter

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

func (*Repository_Expecter) CountActive

func (_e *Repository_Expecter) CountActive(ctx interface{}, userID interface{}, orgID interface{}) *Repository_CountActive_Call

CountActive is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • orgID string

func (*Repository_Expecter) Create

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

Create is a helper method to define mock.On call

  • ctx context.Context
  • pat models.PAT

func (*Repository_Expecter) Delete added in v0.94.0

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

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) GetBySecretHash added in v0.93.2

func (_e *Repository_Expecter) GetBySecretHash(ctx interface{}, secretHash interface{}) *Repository_GetBySecretHash_Call

GetBySecretHash is a helper method to define mock.On call

  • ctx context.Context
  • secretHash string

func (*Repository_Expecter) IsTitleAvailable added in v0.94.0

func (_e *Repository_Expecter) IsTitleAvailable(ctx interface{}, userID interface{}, orgID interface{}, title interface{}) *Repository_IsTitleAvailable_Call

IsTitleAvailable is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • orgID string
  • title string

func (*Repository_Expecter) List added in v0.94.0

func (_e *Repository_Expecter) List(ctx interface{}, userID interface{}, orgID interface{}, query interface{}) *Repository_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • orgID string
  • query *rql.Query

func (*Repository_Expecter) Regenerate added in v0.94.0

func (_e *Repository_Expecter) Regenerate(ctx interface{}, id interface{}, secretHash interface{}, expiresAt interface{}) *Repository_Regenerate_Call

Regenerate is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • secretHash string
  • expiresAt time.Time

func (*Repository_Expecter) Update added in v0.94.0

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

Update is a helper method to define mock.On call

  • ctx context.Context
  • pat models.PAT

func (*Repository_Expecter) UpdateLastUsedAt added in v0.93.2

func (_e *Repository_Expecter) UpdateLastUsedAt(ctx interface{}, id interface{}, at interface{}) *Repository_UpdateLastUsedAt_Call

UpdateLastUsedAt is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • at time.Time

type Repository_GetByID_Call added in v0.93.2

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

func (*Repository_GetByID_Call) Run added in v0.93.2

func (*Repository_GetByID_Call) RunAndReturn added in v0.93.2

type Repository_GetBySecretHash_Call added in v0.93.2

type Repository_GetBySecretHash_Call struct {
	*mock.Call
}

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

func (*Repository_GetBySecretHash_Call) Return added in v0.93.2

func (*Repository_GetBySecretHash_Call) Run added in v0.93.2

func (*Repository_GetBySecretHash_Call) RunAndReturn added in v0.93.2

type Repository_IsTitleAvailable_Call added in v0.94.0

type Repository_IsTitleAvailable_Call struct {
	*mock.Call
}

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

func (*Repository_IsTitleAvailable_Call) Return added in v0.94.0

func (*Repository_IsTitleAvailable_Call) Run added in v0.94.0

func (*Repository_IsTitleAvailable_Call) RunAndReturn added in v0.94.0

type Repository_List_Call added in v0.94.0

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.94.0

func (*Repository_List_Call) Run added in v0.94.0

func (_c *Repository_List_Call) Run(run func(ctx context.Context, userID string, orgID string, query *rql.Query)) *Repository_List_Call

func (*Repository_List_Call) RunAndReturn added in v0.94.0

type Repository_Regenerate_Call added in v0.94.0

type Repository_Regenerate_Call struct {
	*mock.Call
}

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

func (*Repository_Regenerate_Call) Return added in v0.94.0

func (*Repository_Regenerate_Call) Run added in v0.94.0

func (_c *Repository_Regenerate_Call) Run(run func(ctx context.Context, id string, secretHash string, expiresAt time.Time)) *Repository_Regenerate_Call

func (*Repository_Regenerate_Call) RunAndReturn added in v0.94.0

type Repository_UpdateLastUsedAt_Call added in v0.93.2

type Repository_UpdateLastUsedAt_Call struct {
	*mock.Call
}

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

func (*Repository_UpdateLastUsedAt_Call) Return added in v0.93.2

func (*Repository_UpdateLastUsedAt_Call) Run added in v0.93.2

func (*Repository_UpdateLastUsedAt_Call) RunAndReturn added in v0.93.2

type Repository_Update_Call added in v0.94.0

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

func (*Repository_Update_Call) Run added in v0.94.0

func (*Repository_Update_Call) RunAndReturn added in v0.94.0

type RoleService

type RoleService struct {
	mock.Mock
}

RoleService is an autogenerated mock type for the RoleService type

func NewRoleService

func NewRoleService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RoleService

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

func (_m *RoleService) EXPECT() *RoleService_Expecter

func (*RoleService) Get

func (_m *RoleService) Get(ctx context.Context, id string) (role.Role, error)

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

func (*RoleService) List

func (_m *RoleService) List(ctx context.Context, f role.Filter) ([]role.Role, error)

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

type RoleService_Expecter

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

func (*RoleService_Expecter) Get

func (_e *RoleService_Expecter) Get(ctx interface{}, id interface{}) *RoleService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*RoleService_Expecter) List

func (_e *RoleService_Expecter) List(ctx interface{}, f interface{}) *RoleService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • f role.Filter

type RoleService_Get_Call

type RoleService_Get_Call struct {
	*mock.Call
}

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

func (*RoleService_Get_Call) Return

func (*RoleService_Get_Call) Run

func (_c *RoleService_Get_Call) Run(run func(ctx context.Context, id string)) *RoleService_Get_Call

func (*RoleService_Get_Call) RunAndReturn

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

type RoleService_List_Call

type RoleService_List_Call struct {
	*mock.Call
}

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

func (*RoleService_List_Call) Return

func (_c *RoleService_List_Call) Return(_a0 []role.Role, _a1 error) *RoleService_List_Call

func (*RoleService_List_Call) Run

func (*RoleService_List_Call) RunAndReturn

Jump to

Keyboard shortcuts

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