Documentation ¶
Index ¶
- type Namespace
- type NamespaceRepository
- func (n *NamespaceRepository) GetAll(ctx context.Context, projectName tenant.ProjectName) ([]*tenant.Namespace, error)
- func (n *NamespaceRepository) GetByName(ctx context.Context, projectName tenant.ProjectName, name tenant.NamespaceName) (*tenant.Namespace, error)
- func (n *NamespaceRepository) Save(ctx context.Context, namespace *tenant.Namespace) error
- type Project
- type ProjectRepository
- type Secret
- type SecretRepository
- func (s SecretRepository) Delete(ctx context.Context, projName tenant.ProjectName, nsName string, ...) error
- func (s SecretRepository) Get(ctx context.Context, projName tenant.ProjectName, nsName string, ...) (*tenant.Secret, error)
- func (s SecretRepository) GetAll(ctx context.Context, projName tenant.ProjectName, nsName string) ([]*tenant.Secret, error)
- func (s SecretRepository) GetSecretsInfo(ctx context.Context, projName tenant.ProjectName) ([]*dto.SecretInfo, error)
- func (s SecretRepository) Save(ctx context.Context, tenantSecret *tenant.Secret) error
- func (s SecretRepository) Update(ctx context.Context, tenantSecret *tenant.Secret) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespaceRepository ¶
type NamespaceRepository struct {
// contains filtered or unexported fields
}
func NewNamespaceRepository ¶
func NewNamespaceRepository(pool *pgxpool.Pool) *NamespaceRepository
func (*NamespaceRepository) GetAll ¶
func (n *NamespaceRepository) GetAll(ctx context.Context, projectName tenant.ProjectName) ([]*tenant.Namespace, error)
func (*NamespaceRepository) GetByName ¶
func (n *NamespaceRepository) GetByName(ctx context.Context, projectName tenant.ProjectName, name tenant.NamespaceName) (*tenant.Namespace, error)
type ProjectRepository ¶
type ProjectRepository struct {
// contains filtered or unexported fields
}
func NewProjectRepository ¶
func NewProjectRepository(pool *pgxpool.Pool) *ProjectRepository
func (ProjectRepository) GetByName ¶
func (repo ProjectRepository) GetByName(ctx context.Context, name tenant.ProjectName) (*tenant.Project, error)
type Secret ¶
type Secret struct { ID uuid.UUID Name string Value string ProjectName string NamespaceName sql.NullString CreatedAt time.Time UpdatedAt time.Time }
func (*Secret) ToSecretInfo ¶
func (s *Secret) ToSecretInfo() (*dto.SecretInfo, error)
type SecretRepository ¶
type SecretRepository struct {
// contains filtered or unexported fields
}
func NewSecretRepository ¶
func NewSecretRepository(pool *pgxpool.Pool) *SecretRepository
func (SecretRepository) Delete ¶
func (s SecretRepository) Delete(ctx context.Context, projName tenant.ProjectName, nsName string, name tenant.SecretName) error
Delete will not support soft delete, once deleted it has to be created again
func (SecretRepository) Get ¶
func (s SecretRepository) Get(ctx context.Context, projName tenant.ProjectName, nsName string, name tenant.SecretName) (*tenant.Secret, error)
Get is scoped to the tenant provided in the argument
func (SecretRepository) GetAll ¶
func (s SecretRepository) GetAll(ctx context.Context, projName tenant.ProjectName, nsName string) ([]*tenant.Secret, error)
func (SecretRepository) GetSecretsInfo ¶
func (s SecretRepository) GetSecretsInfo(ctx context.Context, projName tenant.ProjectName) ([]*dto.SecretInfo, error)
Click to show internal directories.
Click to hide internal directories.