Documentation
¶
Index ¶
- type MockAccessControlService
- func (m *MockAccessControlService) EnsurePermissions(ctx context.Context, permissions []rootservices.PermissionDefinition) error
- func (m *MockAccessControlService) RoleExists(ctx context.Context, roleName string) (bool, error)
- func (m *MockAccessControlService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error
- func (m *MockAccessControlService) ValidateRoleAssignment(ctx context.Context, roleName string, assignerUserID *string) (bool, error)
- type MockApiKeyRepository
- func (m *MockApiKeyRepository) Create(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
- func (m *MockApiKeyRepository) Delete(ctx context.Context, id string) error
- func (m *MockApiKeyRepository) DeleteAllByOwner(ctx context.Context, ownerType string, ownerID string) error
- func (m *MockApiKeyRepository) DeleteExpired(ctx context.Context) error
- func (m *MockApiKeyRepository) GetAll(ctx context.Context, ownerType *string, ownerID *string, page int, limit int) ([]*types.ApiKey, int, error)
- func (m *MockApiKeyRepository) GetByID(ctx context.Context, id string) (*types.ApiKey, error)
- func (m *MockApiKeyRepository) GetByKeyHash(ctx context.Context, keyHash string) (*types.ApiKey, error)
- func (m *MockApiKeyRepository) Update(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
- func (m *MockApiKeyRepository) WithTx(tx bun.IDB) repositories.ApiKeyRepository
- type MockApiKeyService
- func (m *MockApiKeyService) Create(ctx context.Context, actor *models.Actor, req types.CreateApiKeyRequest) (*types.CreateApiKeyResponse, error)
- func (m *MockApiKeyService) Delete(ctx context.Context, actor *models.Actor, id string) error
- func (m *MockApiKeyService) DeleteAllByOwner(ctx context.Context, actor *models.Actor, ownerType string, ownerID string) error
- func (m *MockApiKeyService) DeleteExpired(ctx context.Context) error
- func (m *MockApiKeyService) GetAll(ctx context.Context, actor *models.Actor, req types.GetApiKeysRequest) (*types.GetAllApiKeysResponse, error)
- func (m *MockApiKeyService) GetByID(ctx context.Context, actor *models.Actor, id string) (*types.ApiKey, error)
- func (m *MockApiKeyService) RecordLastRequest(ctx context.Context, id string, timestamp time.Time) (*types.ApiKey, error)
- func (m *MockApiKeyService) Update(ctx context.Context, actor *models.Actor, id string, ...) (*types.ApiKey, error)
- func (m *MockApiKeyService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error
- func (m *MockApiKeyService) Verify(ctx context.Context, req types.VerifyApiKeyRequest) (*types.VerifyApiKeyResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAccessControlService ¶
func (*MockAccessControlService) EnsurePermissions ¶
func (m *MockAccessControlService) EnsurePermissions(ctx context.Context, permissions []rootservices.PermissionDefinition) error
func (*MockAccessControlService) RoleExists ¶
func (*MockAccessControlService) ValidatePermissionKeys ¶
func (m *MockAccessControlService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error
func (*MockAccessControlService) ValidateRoleAssignment ¶
type MockApiKeyRepository ¶
func (*MockApiKeyRepository) Delete ¶
func (m *MockApiKeyRepository) Delete(ctx context.Context, id string) error
func (*MockApiKeyRepository) DeleteAllByOwner ¶
func (*MockApiKeyRepository) DeleteExpired ¶
func (m *MockApiKeyRepository) DeleteExpired(ctx context.Context) error
func (*MockApiKeyRepository) GetByKeyHash ¶
func (*MockApiKeyRepository) WithTx ¶
func (m *MockApiKeyRepository) WithTx(tx bun.IDB) repositories.ApiKeyRepository
type MockApiKeyService ¶
func (*MockApiKeyService) Create ¶
func (m *MockApiKeyService) Create(ctx context.Context, actor *models.Actor, req types.CreateApiKeyRequest) (*types.CreateApiKeyResponse, error)
func (*MockApiKeyService) DeleteAllByOwner ¶
func (*MockApiKeyService) DeleteExpired ¶
func (m *MockApiKeyService) DeleteExpired(ctx context.Context) error
func (*MockApiKeyService) GetAll ¶
func (m *MockApiKeyService) GetAll(ctx context.Context, actor *models.Actor, req types.GetApiKeysRequest) (*types.GetAllApiKeysResponse, error)
func (*MockApiKeyService) RecordLastRequest ¶
func (*MockApiKeyService) ValidatePermissionKeys ¶
func (m *MockApiKeyService) ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error
func (*MockApiKeyService) Verify ¶
func (m *MockApiKeyService) Verify(ctx context.Context, req types.VerifyApiKeyRequest) (*types.VerifyApiKeyResult, error)
Click to show internal directories.
Click to hide internal directories.