Documentation ¶
Index ¶
- type Auth
- type AuthUseCase
- type AuthUseCaseMock
- type Secrets
- type SecretsUseCase
- func (uc *SecretsUseCase) Create(ctx context.Context, owner uuid.UUID, name string, kind goph.DataKind, ...) (uuid.UUID, error)
- func (uc *SecretsUseCase) Delete(ctx context.Context, owner, id uuid.UUID) error
- func (uc *SecretsUseCase) Get(ctx context.Context, owner, id uuid.UUID) (*entity.Secret, error)
- func (uc *SecretsUseCase) List(ctx context.Context, owner uuid.UUID) ([]entity.Secret, error)
- func (uc *SecretsUseCase) Update(ctx context.Context, owner, id uuid.UUID, changed []string, name string, ...) error
- type SecretsUseCaseMock
- func (m *SecretsUseCaseMock) Create(ctx context.Context, owner uuid.UUID, name string, kind goph.DataKind, ...) (uuid.UUID, error)
- func (m *SecretsUseCaseMock) Delete(ctx context.Context, owner, id uuid.UUID) error
- func (m *SecretsUseCaseMock) Get(ctx context.Context, owner, id uuid.UUID) (*entity.Secret, error)
- func (m *SecretsUseCaseMock) List(ctx context.Context, owner uuid.UUID) ([]entity.Secret, error)
- func (m *SecretsUseCaseMock) Update(ctx context.Context, owner, id uuid.UUID, changed []string, name string, ...) error
- type UseCases
- type Users
- type UsersUseCase
- type UsersUseCaseMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthUseCase ¶
type AuthUseCase struct {
// contains filtered or unexported fields
}
AuthUseCase contains business logic related to authentication.
func NewAuthUseCase ¶
func NewAuthUseCase( secret creds.Password, users repo.Users, ) *AuthUseCase
NewAuthUseCase create and initializes new AuthUseCase object.
func (*AuthUseCase) Login ¶
func (uc *AuthUseCase) Login( ctx context.Context, username, securityKey string, ) (entity.AccessToken, error)
type AuthUseCaseMock ¶
func (*AuthUseCaseMock) Login ¶
func (m *AuthUseCaseMock) Login( ctx context.Context, username, securityKey string, ) (entity.AccessToken, error)
type Secrets ¶
type Secrets interface { Create( ctx context.Context, owner uuid.UUID, name string, kind goph.DataKind, metadata, data []byte, ) (uuid.UUID, error) List(ctx context.Context, owner uuid.UUID) ([]entity.Secret, error) Get(ctx context.Context, owner, id uuid.UUID) (*entity.Secret, error) Update( ctx context.Context, owner, id uuid.UUID, changed []string, name string, metadata []byte, data []byte, ) error Delete(ctx context.Context, owner, id uuid.UUID) error }
type SecretsUseCase ¶
type SecretsUseCase struct {
// contains filtered or unexported fields
}
SecretsUseCase contains business logic related to secrets management.
func NewSecretsUseCase ¶
func NewSecretsUseCase(secrets repo.Secrets) *SecretsUseCase
NewSecretsUseCase create and initializes new SecretsUseCase object.
func (*SecretsUseCase) Create ¶
func (uc *SecretsUseCase) Create( ctx context.Context, owner uuid.UUID, name string, kind goph.DataKind, metadata, data []byte, ) (uuid.UUID, error)
Create creates new secret.
type SecretsUseCaseMock ¶
type UsersUseCase ¶
type UsersUseCase struct {
// contains filtered or unexported fields
}
UsersUseCase contains business logic related to users management.
func NewUsersUseCase ¶
func NewUsersUseCase(secret creds.Password, users repo.Users) *UsersUseCase
NewUsersUseCase create and initializes new UsersUseCase object.
func (UsersUseCase) Register ¶
func (uc UsersUseCase) Register( ctx context.Context, username, securityKey string, ) (entity.AccessToken, error)
Register creates a new user.
type UsersUseCaseMock ¶
func (*UsersUseCaseMock) Register ¶
func (m *UsersUseCaseMock) Register( ctx context.Context, username, securityKey string, ) (entity.AccessToken, error)
Click to show internal directories.
Click to hide internal directories.