Documentation ¶
Index ¶
- type NamespaceGetter
- type NamespaceRepository
- type NamespaceService
- func (ns NamespaceService) Get(ctx context.Context, projName tenant.ProjectName, ...) (*tenant.Namespace, error)
- func (ns NamespaceService) GetAll(ctx context.Context, projectName tenant.ProjectName) ([]*tenant.Namespace, error)
- func (ns NamespaceService) Save(ctx context.Context, namespace *tenant.Namespace) error
- type PresetRepository
- type ProjectGetter
- type ProjectRepository
- type ProjectService
- type SecretRepository
- type SecretService
- func (s SecretService) Delete(ctx context.Context, projName tenant.ProjectName, nsName string, ...) error
- func (s SecretService) Get(ctx context.Context, projName tenant.ProjectName, namespaceName, name string) (*tenant.PlainTextSecret, error)
- func (s SecretService) GetAll(ctx context.Context, projName tenant.ProjectName, namespaceName string) ([]*tenant.PlainTextSecret, error)
- func (s SecretService) GetSecretsInfo(ctx context.Context, projName tenant.ProjectName) ([]*dto.SecretInfo, error)
- func (s SecretService) Save(ctx context.Context, projName tenant.ProjectName, nsName string, ...) error
- func (s SecretService) Update(ctx context.Context, projName tenant.ProjectName, nsName string, ...) error
- type SecretsGetter
- type TenantService
- func (t TenantService) GetDetails(ctx context.Context, tnnt tenant.Tenant) (*tenant.WithDetails, error)
- func (t TenantService) GetProject(ctx context.Context, name tenant.ProjectName) (*tenant.Project, error)
- func (t TenantService) GetSecret(ctx context.Context, tnnt tenant.Tenant, name string) (*tenant.PlainTextSecret, error)
- func (t TenantService) GetSecrets(ctx context.Context, tnnt tenant.Tenant) ([]*tenant.PlainTextSecret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespaceGetter ¶
type NamespaceGetter interface {
Get(context.Context, tenant.ProjectName, tenant.NamespaceName) (*tenant.Namespace, error)
}
type NamespaceRepository ¶
type NamespaceService ¶
type NamespaceService struct {
// contains filtered or unexported fields
}
func NewNamespaceService ¶
func NewNamespaceService(nsRepo NamespaceRepository) *NamespaceService
func (NamespaceService) Get ¶
func (ns NamespaceService) Get(ctx context.Context, projName tenant.ProjectName, namespaceName tenant.NamespaceName) (*tenant.Namespace, error)
func (NamespaceService) GetAll ¶
func (ns NamespaceService) GetAll(ctx context.Context, projectName tenant.ProjectName) ([]*tenant.Namespace, error)
type PresetRepository ¶ added in v0.10.0
type PresetRepository interface { Create(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) error Read(ctx context.Context, projectName tenant.ProjectName) ([]tenant.Preset, error) Update(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) error Delete(ctx context.Context, projectName tenant.ProjectName, presetName string) error }
type ProjectGetter ¶
type ProjectRepository ¶
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
func NewProjectService ¶
func NewProjectService(projectRepo ProjectRepository, presetRepo PresetRepository) *ProjectService
func (ProjectService) Get ¶
func (s ProjectService) Get(ctx context.Context, name tenant.ProjectName) (*tenant.Project, error)
type SecretRepository ¶
type SecretRepository interface { Save(ctx context.Context, secret *tenant.Secret) error Update(ctx context.Context, secret *tenant.Secret) error Get(ctx context.Context, projName tenant.ProjectName, nsName string, name tenant.SecretName) (*tenant.Secret, error) GetAll(ctx context.Context, projName tenant.ProjectName, nsName string) ([]*tenant.Secret, error) Delete(ctx context.Context, projName tenant.ProjectName, nsName string, name tenant.SecretName) error GetSecretsInfo(ctx context.Context, projName tenant.ProjectName) ([]*dto.SecretInfo, error) }
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
func NewSecretService ¶
func NewSecretService(appKey *[32]byte, repo SecretRepository, logger log.Logger) *SecretService
func (SecretService) Delete ¶
func (s SecretService) Delete(ctx context.Context, projName tenant.ProjectName, nsName string, name tenant.SecretName) error
func (SecretService) Get ¶
func (s SecretService) Get(ctx context.Context, projName tenant.ProjectName, namespaceName, name string) (*tenant.PlainTextSecret, error)
func (SecretService) GetAll ¶
func (s SecretService) GetAll(ctx context.Context, projName tenant.ProjectName, namespaceName string) ([]*tenant.PlainTextSecret, error)
func (SecretService) GetSecretsInfo ¶
func (s SecretService) GetSecretsInfo(ctx context.Context, projName tenant.ProjectName) ([]*dto.SecretInfo, error)
func (SecretService) Save ¶
func (s SecretService) Save(ctx context.Context, projName tenant.ProjectName, nsName string, secret *tenant.PlainTextSecret) error
func (SecretService) Update ¶
func (s SecretService) Update(ctx context.Context, projName tenant.ProjectName, nsName string, secret *tenant.PlainTextSecret) error
type SecretsGetter ¶
type SecretsGetter interface { Get(ctx context.Context, projName tenant.ProjectName, namespaceName, name string) (*tenant.PlainTextSecret, error) GetAll(ctx context.Context, projName tenant.ProjectName, namespaceName string) ([]*tenant.PlainTextSecret, error) }
type TenantService ¶
type TenantService struct {
// contains filtered or unexported fields
}
func NewTenantService ¶
func NewTenantService(projGetter ProjectGetter, nsGetter NamespaceGetter, secretsGetter SecretsGetter, logger log.Logger) *TenantService
func (TenantService) GetDetails ¶
func (t TenantService) GetDetails(ctx context.Context, tnnt tenant.Tenant) (*tenant.WithDetails, error)
func (TenantService) GetProject ¶
func (t TenantService) GetProject(ctx context.Context, name tenant.ProjectName) (*tenant.Project, error)
func (TenantService) GetSecret ¶
func (t TenantService) GetSecret(ctx context.Context, tnnt tenant.Tenant, name string) (*tenant.PlainTextSecret, error)
func (TenantService) GetSecrets ¶
func (t TenantService) GetSecrets(ctx context.Context, tnnt tenant.Tenant) ([]*tenant.PlainTextSecret, error)
Click to show internal directories.
Click to hide internal directories.