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 Preset
- type PresetRepository
- func (p PresetRepository) Create(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) error
- func (p PresetRepository) Delete(ctx context.Context, projectName tenant.ProjectName, presetName string) error
- func (p PresetRepository) Read(ctx context.Context, projectName tenant.ProjectName) ([]tenant.Preset, error)
- func (p PresetRepository) Update(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) 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 PresetRepository ¶ added in v0.10.0
type PresetRepository struct {
// contains filtered or unexported fields
}
func NewPresetRepository ¶ added in v0.10.0
func NewPresetRepository(db *pgxpool.Pool) *PresetRepository
func (PresetRepository) Create ¶ added in v0.10.0
func (p PresetRepository) Create(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) error
func (PresetRepository) Delete ¶ added in v0.10.0
func (p PresetRepository) Delete(ctx context.Context, projectName tenant.ProjectName, presetName string) error
func (PresetRepository) Read ¶ added in v0.10.0
func (p PresetRepository) Read(ctx context.Context, projectName tenant.ProjectName) ([]tenant.Preset, error)
func (PresetRepository) Update ¶ added in v0.10.0
func (p PresetRepository) Update(ctx context.Context, projectName tenant.ProjectName, preset tenant.Preset) 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.