tests

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 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 MockAccessControlService

type MockAccessControlService struct {
	mock.Mock
}

func (*MockAccessControlService) EnsurePermissions

func (m *MockAccessControlService) EnsurePermissions(ctx context.Context, permissions []rootservices.PermissionDefinition) error

func (*MockAccessControlService) RoleExists

func (m *MockAccessControlService) RoleExists(ctx context.Context, roleName string) (bool, error)

func (*MockAccessControlService) ValidatePermissionKeys

func (m *MockAccessControlService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error

func (*MockAccessControlService) ValidateRoleAssignment

func (m *MockAccessControlService) ValidateRoleAssignment(ctx context.Context, roleName string, assignerUserID *string) (bool, error)

type MockApiKeyRepository

type MockApiKeyRepository struct {
	mock.Mock
}

func (*MockApiKeyRepository) Create

func (m *MockApiKeyRepository) Create(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)

func (*MockApiKeyRepository) Delete

func (m *MockApiKeyRepository) Delete(ctx context.Context, id string) error

func (*MockApiKeyRepository) DeleteAllByOwner

func (m *MockApiKeyRepository) DeleteAllByOwner(ctx context.Context, ownerType string, ownerID string) error

func (*MockApiKeyRepository) DeleteExpired

func (m *MockApiKeyRepository) DeleteExpired(ctx context.Context) error

func (*MockApiKeyRepository) GetAll

func (m *MockApiKeyRepository) GetAll(ctx context.Context, ownerType *string, ownerID *string, page int, limit int) ([]*types.ApiKey, int, error)

func (*MockApiKeyRepository) GetByID

func (m *MockApiKeyRepository) GetByID(ctx context.Context, id string) (*types.ApiKey, error)

func (*MockApiKeyRepository) GetByKeyHash

func (m *MockApiKeyRepository) GetByKeyHash(ctx context.Context, keyHash string) (*types.ApiKey, error)

func (*MockApiKeyRepository) Update

func (m *MockApiKeyRepository) Update(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)

func (*MockApiKeyRepository) WithTx

type MockApiKeyService

type MockApiKeyService struct {
	mock.Mock
}

func (*MockApiKeyService) Create

func (*MockApiKeyService) Delete

func (m *MockApiKeyService) Delete(ctx context.Context, actor *models.Actor, id string) error

func (*MockApiKeyService) DeleteAllByOwner

func (m *MockApiKeyService) DeleteAllByOwner(ctx context.Context, actor *models.Actor, ownerType string, ownerID string) error

func (*MockApiKeyService) DeleteExpired

func (m *MockApiKeyService) DeleteExpired(ctx context.Context) error

func (*MockApiKeyService) GetAll

func (*MockApiKeyService) GetByID

func (m *MockApiKeyService) GetByID(ctx context.Context, actor *models.Actor, id string) (*types.ApiKey, error)

func (*MockApiKeyService) RecordLastRequest

func (m *MockApiKeyService) RecordLastRequest(ctx context.Context, id string, timestamp time.Time) (*types.ApiKey, error)

func (*MockApiKeyService) Update

func (*MockApiKeyService) ValidatePermissionKeys

func (m *MockApiKeyService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error

func (*MockApiKeyService) Verify

Jump to

Keyboard shortcuts

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