Documentation
¶
Index ¶
- type MemoryCompatibilityRepository
- func (r *MemoryCompatibilityRepository) Create(_ context.Context, m *domain.CompatibilityMatrix) error
- func (r *MemoryCompatibilityRepository) Delete(_ context.Context, id string) error
- func (r *MemoryCompatibilityRepository) GetAll(_ context.Context) ([]*domain.CompatibilityMatrix, error)
- func (r *MemoryCompatibilityRepository) GetByID(_ context.Context, id string) (*domain.CompatibilityMatrix, error)
- func (r *MemoryCompatibilityRepository) Update(_ context.Context, m *domain.CompatibilityMatrix) error
- func (r *MemoryCompatibilityRepository) Validate(_ context.Context, tools map[string]string) (*domain.CompatibilityMatrix, error)
- type MemoryHelmStepMetadataRepository
- func (r *MemoryHelmStepMetadataRepository) Create(_ context.Context, item *domain.HelmStepMetadata) error
- func (r *MemoryHelmStepMetadataRepository) Delete(_ context.Context, stepName string) error
- func (r *MemoryHelmStepMetadataRepository) GetByStep(_ context.Context, stepName string) (*domain.HelmStepMetadata, error)
- func (r *MemoryHelmStepMetadataRepository) List(_ context.Context) ([]*domain.HelmStepMetadata, error)
- func (r *MemoryHelmStepMetadataRepository) Seed(items ...*domain.HelmStepMetadata)
- func (r *MemoryHelmStepMetadataRepository) Update(_ context.Context, item *domain.HelmStepMetadata) error
- type MemoryHistoryRepository
- func (r *MemoryHistoryRepository) GetDiff(_ context.Context, stackID, versionID string) ([]domain.ConfigDiff, error)
- func (r *MemoryHistoryRepository) GetVersion(_ context.Context, stackID, versionID string) (*domain.StackVersion, error)
- func (r *MemoryHistoryRepository) ListVersions(_ context.Context, stackID string) ([]*domain.StackVersion, error)
- func (r *MemoryHistoryRepository) SaveVersion(_ context.Context, version *domain.StackVersion) error
- type MemoryResourceDefaultRepository
- type MemoryStackRepository
- func (r *MemoryStackRepository) Create(_ context.Context, stack *domain.Stack) error
- func (r *MemoryStackRepository) Delete(_ context.Context, id string) error
- func (r *MemoryStackRepository) FindByID(ctx context.Context, id string) (*domain.Stack, error)
- func (r *MemoryStackRepository) GetByID(_ context.Context, id string) (*domain.Stack, error)
- func (r *MemoryStackRepository) List(_ context.Context, orgID string, includeDeleted bool) ([]*domain.Stack, error)
- func (r *MemoryStackRepository) ListByCluster(_ context.Context, clusterID string) ([]*domain.Stack, error)
- func (r *MemoryStackRepository) ListCompleted(_ context.Context) ([]*domain.Stack, error)
- func (r *MemoryStackRepository) ListInFlight(_ context.Context) ([]*domain.Stack, error)
- func (r *MemoryStackRepository) SetYAMLOverride(_ context.Context, stackID, key, yamlText string) error
- func (r *MemoryStackRepository) TouchUpdatedAt(_ context.Context, stackID string) error
- func (r *MemoryStackRepository) Update(_ context.Context, stack *domain.Stack) error
- func (r *MemoryStackRepository) UpdateTools(ctx context.Context, stack *domain.Stack) error
- type MemoryTemplateRepository
- func (r *MemoryTemplateRepository) Create(_ context.Context, template *domain.Template) error
- func (r *MemoryTemplateRepository) Delete(_ context.Context, id string) error
- func (r *MemoryTemplateRepository) GetByID(_ context.Context, id string) (*domain.Template, error)
- func (r *MemoryTemplateRepository) List(_ context.Context) ([]*domain.Template, error)
- func (r *MemoryTemplateRepository) Update(_ context.Context, template *domain.Template) error
- type PostgresClusterReader
- type PostgresCompatibilityRepository
- func (r *PostgresCompatibilityRepository) Create(ctx context.Context, m *domain.CompatibilityMatrix) error
- func (r *PostgresCompatibilityRepository) Delete(ctx context.Context, id string) error
- func (r *PostgresCompatibilityRepository) GetAll(ctx context.Context) ([]*domain.CompatibilityMatrix, error)
- func (r *PostgresCompatibilityRepository) GetByID(ctx context.Context, id string) (*domain.CompatibilityMatrix, error)
- func (r *PostgresCompatibilityRepository) Update(ctx context.Context, m *domain.CompatibilityMatrix) error
- func (r *PostgresCompatibilityRepository) Validate(ctx context.Context, tools map[string]string) (*domain.CompatibilityMatrix, error)
- type PostgresDeployLogStore
- func (r *PostgresDeployLogStore) Append(ctx context.Context, deploymentID string, entry port.LogEntry) error
- func (r *PostgresDeployLogStore) Delete(ctx context.Context, deploymentID string) error
- func (r *PostgresDeployLogStore) List(ctx context.Context, deploymentID string, limit int) ([]port.LogEntry, error)
- type PostgresHelmStepMetadataRepository
- func (r *PostgresHelmStepMetadataRepository) Create(ctx context.Context, item *domain.HelmStepMetadata) error
- func (r *PostgresHelmStepMetadataRepository) Delete(ctx context.Context, stepName string) error
- func (r *PostgresHelmStepMetadataRepository) GetByStep(ctx context.Context, stepName string) (*domain.HelmStepMetadata, error)
- func (r *PostgresHelmStepMetadataRepository) List(ctx context.Context) ([]*domain.HelmStepMetadata, error)
- func (r *PostgresHelmStepMetadataRepository) Update(ctx context.Context, item *domain.HelmStepMetadata) error
- type PostgresHistoryRepository
- func (r *PostgresHistoryRepository) GetDiff(ctx context.Context, stackID, versionID string) ([]domain.ConfigDiff, error)
- func (r *PostgresHistoryRepository) GetVersion(ctx context.Context, stackID, versionID string) (*domain.StackVersion, error)
- func (r *PostgresHistoryRepository) ListVersions(ctx context.Context, stackID string) ([]*domain.StackVersion, error)
- func (r *PostgresHistoryRepository) SaveVersion(ctx context.Context, version *domain.StackVersion) error
- type PostgresKubeconfigProvider
- type PostgresResourceDefaultRepository
- type PostgresStackImageScanRepository
- func (r *PostgresStackImageScanRepository) ClaimCVENotices(ctx context.Context, stackID string, ids []string, at time.Time) ([]string, error)
- func (r *PostgresStackImageScanRepository) ListByStack(ctx context.Context, stackID string) ([]domain.StackImageScan, error)
- func (r *PostgresStackImageScanRepository) ListVulnerabilities(ctx context.Context, stackID, digest string) (domain.StackImageVulnerabilities, error)
- func (r *PostgresStackImageScanRepository) NotifiedCVEIDs(ctx context.Context, stackID string) (map[string]bool, error)
- func (r *PostgresStackImageScanRepository) ReleaseCVENotices(ctx context.Context, stackID string, ids []string) error
- func (r *PostgresStackImageScanRepository) ReplaceForStack(ctx context.Context, stackID string, scans []domain.StackImageScan) error
- func (r *PostgresStackImageScanRepository) VulnerabilityIDsByRelease(ctx context.Context, stackID, release string) (map[string]bool, bool, error)
- type PostgresStackRepository
- func (r *PostgresStackRepository) Create(ctx context.Context, stack *domain.Stack) error
- func (r *PostgresStackRepository) Delete(ctx context.Context, id string) error
- func (r *PostgresStackRepository) FindByID(ctx context.Context, id string) (*domain.Stack, error)
- func (r *PostgresStackRepository) GetByID(ctx context.Context, id string) (*domain.Stack, error)
- func (r *PostgresStackRepository) List(ctx context.Context, orgID string, includeDeleted bool) ([]*domain.Stack, error)
- func (r *PostgresStackRepository) ListByCluster(ctx context.Context, clusterID string) ([]*domain.Stack, error)
- func (r *PostgresStackRepository) ListCompleted(ctx context.Context) ([]*domain.Stack, error)
- func (r *PostgresStackRepository) ListInFlight(ctx context.Context) ([]*domain.Stack, error)
- func (r *PostgresStackRepository) SetYAMLOverride(ctx context.Context, stackID, key, yamlText string) error
- func (r *PostgresStackRepository) TouchUpdatedAt(ctx context.Context, stackID string) error
- func (r *PostgresStackRepository) Update(ctx context.Context, stack *domain.Stack) error
- func (r *PostgresStackRepository) UpdateTools(ctx context.Context, stack *domain.Stack) error
- type PostgresTemplateRepository
- func (r *PostgresTemplateRepository) Create(ctx context.Context, template *domain.Template) error
- func (r *PostgresTemplateRepository) Delete(ctx context.Context, id string) error
- func (r *PostgresTemplateRepository) GetByID(ctx context.Context, id string) (*domain.Template, error)
- func (r *PostgresTemplateRepository) List(ctx context.Context) ([]*domain.Template, error)
- func (r *PostgresTemplateRepository) Update(ctx context.Context, template *domain.Template) error
- type PostgresTokenSourceRegistry
- type PostgresUpgradeRepository
- func (r *PostgresUpgradeRepository) ActiveRun(ctx context.Context, stackID string) (*domain.UpgradeRun, error)
- func (r *PostgresUpgradeRepository) CloseStaleRun(ctx context.Context, run *domain.UpgradeRun, staleBefore time.Time) (bool, error)
- func (r *PostgresUpgradeRepository) CreateBundle(ctx context.Context, b *domain.UpgradeBundle) error
- func (r *PostgresUpgradeRepository) CreateRun(ctx context.Context, run *domain.UpgradeRun) error
- func (r *PostgresUpgradeRepository) FindRunByIdempotencyKey(ctx context.Context, stackID, key string) (*domain.UpgradeRun, error)
- func (r *PostgresUpgradeRepository) GetBundle(ctx context.Context, id string) (*domain.UpgradeBundle, error)
- func (r *PostgresUpgradeRepository) GetRun(ctx context.Context, stackID, runID string) (*domain.UpgradeRun, error)
- func (r *PostgresUpgradeRepository) GetVerifiedBundle(ctx context.Context, id string) (*domain.UpgradeBundle, error)
- func (r *PostgresUpgradeRepository) Heartbeat(ctx context.Context, runID string, at time.Time) error
- func (r *PostgresUpgradeRepository) LatestRun(ctx context.Context, stackID, tool string) (*domain.UpgradeRun, error)
- func (r *PostgresUpgradeRepository) ListBundles(ctx context.Context) ([]domain.UpgradeBundle, error)
- func (r *PostgresUpgradeRepository) ListRuns(ctx context.Context, stackID string, limit int) ([]domain.UpgradeRun, error)
- func (r *PostgresUpgradeRepository) ListVerifiedBundles(ctx context.Context, tool, source string) ([]domain.UpgradeBundle, error)
- func (r *PostgresUpgradeRepository) UpdateBundleStatus(ctx context.Context, id, status string) error
- func (r *PostgresUpgradeRepository) UpdateRun(ctx context.Context, run *domain.UpgradeRun) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCompatibilityRepository ¶
type MemoryCompatibilityRepository struct {
// contains filtered or unexported fields
}
MemoryCompatibilityRepository is an in-memory implementation of port.CompatibilityRepository with three pre-loaded compatibility matrices.
func NewMemoryCompatibilityRepository ¶
func NewMemoryCompatibilityRepository() *MemoryCompatibilityRepository
NewMemoryCompatibilityRepository constructs a MemoryCompatibilityRepository with three canonical compatibility matrices pre-loaded.
func (*MemoryCompatibilityRepository) Create ¶
func (r *MemoryCompatibilityRepository) Create(_ context.Context, m *domain.CompatibilityMatrix) error
Create persists a new matrix. Returns ErrCompatibilityMatrixExists when the id collides with an existing row. F8-Phase5 admin CRUD endpoint backing.
func (*MemoryCompatibilityRepository) Delete ¶
func (r *MemoryCompatibilityRepository) Delete(_ context.Context, id string) error
Delete is idempotent — missing row returns nil. Handlers that want strict 404 semantics should GetByID beforehand.
func (*MemoryCompatibilityRepository) GetAll ¶
func (r *MemoryCompatibilityRepository) GetAll(_ context.Context) ([]*domain.CompatibilityMatrix, error)
GetAll returns all compatibility matrices in id order, like the Postgres repository.
func (*MemoryCompatibilityRepository) GetByID ¶
func (r *MemoryCompatibilityRepository) GetByID(_ context.Context, id string) (*domain.CompatibilityMatrix, error)
GetByID returns the compatibility matrix with the given ID.
func (*MemoryCompatibilityRepository) Update ¶
func (r *MemoryCompatibilityRepository) Update(_ context.Context, m *domain.CompatibilityMatrix) error
Update replaces every mutable field on the matrix identified by m.ID.
func (*MemoryCompatibilityRepository) Validate ¶
func (r *MemoryCompatibilityRepository) Validate(_ context.Context, tools map[string]string) (*domain.CompatibilityMatrix, error)
Validate finds the best matching matrix for the given tool map (tool category -> tool name). Returns the first matrix in id order whose tools all match — the same choice the Postgres repository makes. Returns an error if no match is found.
type MemoryHelmStepMetadataRepository ¶
type MemoryHelmStepMetadataRepository struct {
// contains filtered or unexported fields
}
MemoryHelmStepMetadataRepository is an in-memory implementation of the Helm step metadata repository.
func NewMemoryHelmStepMetadataRepository ¶
func NewMemoryHelmStepMetadataRepository() *MemoryHelmStepMetadataRepository
NewMemoryHelmStepMetadataRepository constructs an empty in-memory repository.
func (*MemoryHelmStepMetadataRepository) Create ¶
func (r *MemoryHelmStepMetadataRepository) Create(_ context.Context, item *domain.HelmStepMetadata) error
func (*MemoryHelmStepMetadataRepository) Delete ¶
func (r *MemoryHelmStepMetadataRepository) Delete(_ context.Context, stepName string) error
func (*MemoryHelmStepMetadataRepository) GetByStep ¶
func (r *MemoryHelmStepMetadataRepository) GetByStep(_ context.Context, stepName string) (*domain.HelmStepMetadata, error)
func (*MemoryHelmStepMetadataRepository) List ¶
func (r *MemoryHelmStepMetadataRepository) List(_ context.Context) ([]*domain.HelmStepMetadata, error)
func (*MemoryHelmStepMetadataRepository) Seed ¶
func (r *MemoryHelmStepMetadataRepository) Seed(items ...*domain.HelmStepMetadata)
func (*MemoryHelmStepMetadataRepository) Update ¶
func (r *MemoryHelmStepMetadataRepository) Update(_ context.Context, item *domain.HelmStepMetadata) error
type MemoryHistoryRepository ¶
type MemoryHistoryRepository struct {
// contains filtered or unexported fields
}
MemoryHistoryRepository is an in-memory implementation of port.HistoryRepository.
func NewMemoryHistoryRepository ¶
func NewMemoryHistoryRepository() *MemoryHistoryRepository
NewMemoryHistoryRepository constructs an empty MemoryHistoryRepository.
func (*MemoryHistoryRepository) GetDiff ¶
func (r *MemoryHistoryRepository) GetDiff(_ context.Context, stackID, versionID string) ([]domain.ConfigDiff, error)
GetDiff computes the diff between the given version and the one immediately preceding it. If there is no previous version, all fields are reported as new (OldValue = "").
func (*MemoryHistoryRepository) GetVersion ¶
func (r *MemoryHistoryRepository) GetVersion(_ context.Context, stackID, versionID string) (*domain.StackVersion, error)
GetVersion returns a specific version by its ID, scoped to a stack.
func (*MemoryHistoryRepository) ListVersions ¶
func (r *MemoryHistoryRepository) ListVersions(_ context.Context, stackID string) ([]*domain.StackVersion, error)
ListVersions returns all versions for a stack, sorted by version number ascending.
func (*MemoryHistoryRepository) SaveVersion ¶
func (r *MemoryHistoryRepository) SaveVersion(_ context.Context, version *domain.StackVersion) error
SaveVersion persists a new stack version snapshot.
type MemoryResourceDefaultRepository ¶
type MemoryResourceDefaultRepository struct {
// contains filtered or unexported fields
}
func NewMemoryResourceDefaultRepository ¶
func NewMemoryResourceDefaultRepository() *MemoryResourceDefaultRepository
func (*MemoryResourceDefaultRepository) List ¶
func (r *MemoryResourceDefaultRepository) List(_ context.Context) ([]*domain.ResourceDefault, error)
func (*MemoryResourceDefaultRepository) Upsert ¶
func (r *MemoryResourceDefaultRepository) Upsert(_ context.Context, resource *domain.ResourceDefault) error
type MemoryStackRepository ¶
type MemoryStackRepository struct {
// contains filtered or unexported fields
}
MemoryStackRepository is an in-memory implementation of port.StackRepository. It is intended for development and testing; it is not safe to use across process restarts.
func NewMemoryStackRepository ¶
func NewMemoryStackRepository() *MemoryStackRepository
NewMemoryStackRepository constructs an empty MemoryStackRepository.
func (*MemoryStackRepository) Create ¶
Create stores a new stack. Returns an error if the ID already exists.
func (*MemoryStackRepository) Delete ¶
func (r *MemoryStackRepository) Delete(_ context.Context, id string) error
Delete removes a stack by ID.
func (*MemoryStackRepository) List ¶
func (r *MemoryStackRepository) List(_ context.Context, orgID string, includeDeleted bool) ([]*domain.Stack, error)
List returns all stacks belonging to the given organization.
func (*MemoryStackRepository) ListByCluster ¶ added in v0.6.0
func (r *MemoryStackRepository) ListByCluster(_ context.Context, clusterID string) ([]*domain.Stack, error)
ListByCluster 는 한 클러스터의 지우지 않은 스택을 조직과 무관하게 돌려준다.
func (*MemoryStackRepository) ListCompleted ¶ added in v0.6.0
ListCompleted 는 설치가 끝난 스택을 조직과 무관하게 돌려준다.
func (*MemoryStackRepository) ListInFlight ¶
ListInFlight 는 설치가 진행 중인 상태로 남아 있는 스택을 조직과 무관하게 돌려준다.
func (*MemoryStackRepository) SetYAMLOverride ¶ added in v0.6.0
func (r *MemoryStackRepository) SetYAMLOverride(_ context.Context, stackID, key, yamlText string) error
SetYAMLOverride 는 스택 설정의 yaml_overrides 에서 키 하나만 바꾼다. 행의 다른 값은 그대로다.
func (*MemoryStackRepository) TouchUpdatedAt ¶
func (r *MemoryStackRepository) TouchUpdatedAt(_ context.Context, stackID string) error
Update replaces a stored stack with the given value. TouchUpdatedAt 은 갱신 시각만 찍는다. 설치가 살아 있음을 알리는 데 쓴다.
func (*MemoryStackRepository) UpdateTools ¶
type MemoryTemplateRepository ¶
type MemoryTemplateRepository struct {
// contains filtered or unexported fields
}
MemoryTemplateRepository is an in-memory implementation of port.TemplateRepository with canonical Golden Path templates.
func NewMemoryTemplateRepository ¶
func NewMemoryTemplateRepository() *MemoryTemplateRepository
NewMemoryTemplateRepository constructs a MemoryTemplateRepository with canonical Golden Path templates pre-loaded.
func (*MemoryTemplateRepository) Delete ¶
func (r *MemoryTemplateRepository) Delete(_ context.Context, id string) error
type PostgresClusterReader ¶
type PostgresClusterReader struct {
// contains filtered or unexported fields
}
PostgresClusterReader implements port.ClusterReader by querying the clusters table the admin module owns. This is safe inside the modular monolith because both modules share one database; a future microservice split would replace this with a gRPC/HTTP client.
func NewPostgresClusterReader ¶
func NewPostgresClusterReader(pool *pgxpool.Pool) *PostgresClusterReader
NewPostgresClusterReader constructs a PostgresClusterReader.
func (*PostgresClusterReader) GetClusterSummary ¶
func (r *PostgresClusterReader) GetClusterSummary(ctx context.Context, clusterID string) (*port.ClusterSummary, error)
GetClusterSummary returns the subset of cluster fields the Pre-Deploy Gate needs. Returns nil, nil when the cluster row is missing.
type PostgresCompatibilityRepository ¶
type PostgresCompatibilityRepository struct {
// contains filtered or unexported fields
}
func NewPostgresCompatibilityRepository ¶
func NewPostgresCompatibilityRepository(pool *pgxpool.Pool) *PostgresCompatibilityRepository
func (*PostgresCompatibilityRepository) Create ¶
func (r *PostgresCompatibilityRepository) Create(ctx context.Context, m *domain.CompatibilityMatrix) error
Create inserts a new matrix. Returns port.ErrCompatibilityMatrixExists when the id is already present (ON CONFLICT DO NOTHING + rows-affected check).
func (*PostgresCompatibilityRepository) Delete ¶
func (r *PostgresCompatibilityRepository) Delete(ctx context.Context, id string) error
Delete removes a matrix. Idempotent — missing id is not an error.
func (*PostgresCompatibilityRepository) GetAll ¶
func (r *PostgresCompatibilityRepository) GetAll(ctx context.Context) ([]*domain.CompatibilityMatrix, error)
func (*PostgresCompatibilityRepository) GetByID ¶
func (r *PostgresCompatibilityRepository) GetByID(ctx context.Context, id string) (*domain.CompatibilityMatrix, error)
func (*PostgresCompatibilityRepository) Update ¶
func (r *PostgresCompatibilityRepository) Update(ctx context.Context, m *domain.CompatibilityMatrix) error
Update replaces every mutable column. Returns port.ErrCompatibilityMatrixNotFound when no row matched.
func (*PostgresCompatibilityRepository) Validate ¶
func (r *PostgresCompatibilityRepository) Validate(ctx context.Context, tools map[string]string) (*domain.CompatibilityMatrix, error)
type PostgresDeployLogStore ¶
type PostgresDeployLogStore struct {
// contains filtered or unexported fields
}
PostgresDeployLogStore 는 설치 로그를 stack_deploy_logs 에 남긴다.
로그가 프로세스 메모리에만 있으면 파드가 재시작되는 순간 사라진다. 설치는 20~30분짜리라 그 사이 재시작이 겹칠 확률이 낮지 않고, 그러면 무엇이 왜 멈췄는지 사후에 알 방법이 없다.
func NewPostgresDeployLogStore ¶
func NewPostgresDeployLogStore(pool *pgxpool.Pool) *PostgresDeployLogStore
func (*PostgresDeployLogStore) Append ¶
func (r *PostgresDeployLogStore) Append(ctx context.Context, deploymentID string, entry port.LogEntry) error
Append 는 항목 하나를 남긴다.
type PostgresHelmStepMetadataRepository ¶
type PostgresHelmStepMetadataRepository struct {
// contains filtered or unexported fields
}
PostgresHelmStepMetadataRepository stores DB-backed Helm chart metadata for stack steps.
func NewPostgresHelmStepMetadataRepository ¶
func NewPostgresHelmStepMetadataRepository(pool *pgxpool.Pool) *PostgresHelmStepMetadataRepository
func (*PostgresHelmStepMetadataRepository) Create ¶
func (r *PostgresHelmStepMetadataRepository) Create(ctx context.Context, item *domain.HelmStepMetadata) error
func (*PostgresHelmStepMetadataRepository) Delete ¶
func (r *PostgresHelmStepMetadataRepository) Delete(ctx context.Context, stepName string) error
func (*PostgresHelmStepMetadataRepository) GetByStep ¶
func (r *PostgresHelmStepMetadataRepository) GetByStep(ctx context.Context, stepName string) (*domain.HelmStepMetadata, error)
func (*PostgresHelmStepMetadataRepository) List ¶
func (r *PostgresHelmStepMetadataRepository) List(ctx context.Context) ([]*domain.HelmStepMetadata, error)
func (*PostgresHelmStepMetadataRepository) Update ¶
func (r *PostgresHelmStepMetadataRepository) Update(ctx context.Context, item *domain.HelmStepMetadata) error
type PostgresHistoryRepository ¶
type PostgresHistoryRepository struct {
// contains filtered or unexported fields
}
func NewPostgresHistoryRepository ¶
func NewPostgresHistoryRepository(pool *pgxpool.Pool) *PostgresHistoryRepository
func (*PostgresHistoryRepository) GetDiff ¶
func (r *PostgresHistoryRepository) GetDiff(ctx context.Context, stackID, versionID string) ([]domain.ConfigDiff, error)
func (*PostgresHistoryRepository) GetVersion ¶
func (r *PostgresHistoryRepository) GetVersion(ctx context.Context, stackID, versionID string) (*domain.StackVersion, error)
func (*PostgresHistoryRepository) ListVersions ¶
func (r *PostgresHistoryRepository) ListVersions(ctx context.Context, stackID string) ([]*domain.StackVersion, error)
func (*PostgresHistoryRepository) SaveVersion ¶
func (r *PostgresHistoryRepository) SaveVersion(ctx context.Context, version *domain.StackVersion) error
type PostgresKubeconfigProvider ¶
type PostgresKubeconfigProvider struct {
// contains filtered or unexported fields
}
func NewPostgresKubeconfigProvider ¶
func NewPostgresKubeconfigProvider(pool *pgxpool.Pool, encryptionKey []byte) *PostgresKubeconfigProvider
func (*PostgresKubeconfigProvider) GetKubeconfig ¶
type PostgresResourceDefaultRepository ¶
type PostgresResourceDefaultRepository struct {
// contains filtered or unexported fields
}
func NewPostgresResourceDefaultRepository ¶
func NewPostgresResourceDefaultRepository(pool *pgxpool.Pool) *PostgresResourceDefaultRepository
func (*PostgresResourceDefaultRepository) List ¶
func (r *PostgresResourceDefaultRepository) List(ctx context.Context) ([]*domain.ResourceDefault, error)
func (*PostgresResourceDefaultRepository) Upsert ¶
func (r *PostgresResourceDefaultRepository) Upsert(ctx context.Context, resource *domain.ResourceDefault) error
type PostgresStackImageScanRepository ¶ added in v0.6.0
type PostgresStackImageScanRepository struct {
// contains filtered or unexported fields
}
PostgresStackImageScanRepository 는 설치 이미지 스캔 결과를 보관한다.
func NewPostgresStackImageScanRepository ¶ added in v0.6.0
func NewPostgresStackImageScanRepository(pool *pgxpool.Pool) *PostgresStackImageScanRepository
NewPostgresStackImageScanRepository 는 저장소를 만든다.
func (*PostgresStackImageScanRepository) ClaimCVENotices ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) ClaimCVENotices(ctx context.Context, stackID string, ids []string, at time.Time) ([]string, error)
ClaimCVENotices 는 ids 중 아직 남지 않은 것을 남기고 이번에 남긴 것만 돌려준다. 같은 행을 두 레플리카가 동시에 넣으면 기본 키가 하나만 받는다.
func (*PostgresStackImageScanRepository) ListByStack ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) ListByStack(ctx context.Context, stackID string) ([]domain.StackImageScan, error)
ListByStack 은 스택의 결과를 돌려준다.
func (*PostgresStackImageScanRepository) ListVulnerabilities ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) ListVulnerabilities(ctx context.Context, stackID, digest string) (domain.StackImageVulnerabilities, error)
ListVulnerabilities 는 이미지 하나의 저장된 취약점 목록이다.
func (*PostgresStackImageScanRepository) NotifiedCVEIDs ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) NotifiedCVEIDs(ctx context.Context, stackID string) (map[string]bool, error)
NotifiedCVEIDs 는 스택에 이미 알린 CVE 다.
func (*PostgresStackImageScanRepository) ReleaseCVENotices ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) ReleaseCVENotices(ctx context.Context, stackID string, ids []string) error
ReleaseCVENotices 는 보내지 못한 선점을 되돌린다.
func (*PostgresStackImageScanRepository) ReplaceForStack ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) ReplaceForStack(ctx context.Context, stackID string, scans []domain.StackImageScan) error
ReplaceForStack 은 스택의 결과를 이번 스캔으로 통째로 바꾼다.
func (*PostgresStackImageScanRepository) VulnerabilityIDsByRelease ¶ added in v0.6.0
func (r *PostgresStackImageScanRepository) VulnerabilityIDsByRelease(ctx context.Context, stackID, release string) (map[string]bool, bool, error)
VulnerabilityIDsByRelease 는 스택의 한 릴리스가 설치한 이미지에서 지금 발견된 취약점 ID 와, 그 릴리스의 이미지 중 취약점 목록을 저장한 것이 있는지다. 업그레이드 대상이 아닌 공용 구성요소는 같은 이름의 릴리스라도 뺀다.
type PostgresStackRepository ¶
type PostgresStackRepository struct {
// contains filtered or unexported fields
}
func NewPostgresStackRepository ¶
func NewPostgresStackRepository(pool *pgxpool.Pool) *PostgresStackRepository
func (*PostgresStackRepository) Delete ¶
func (r *PostgresStackRepository) Delete(ctx context.Context, id string) error
func (*PostgresStackRepository) ListByCluster ¶ added in v0.6.0
func (r *PostgresStackRepository) ListByCluster(ctx context.Context, clusterID string) ([]*domain.Stack, error)
ListByCluster 는 한 클러스터의 지우지 않은 스택을 조직과 무관하게 돌려준다.
cluster_id 는 UUID 라 형식이 틀린 값이 오면 쿼리가 실패한다. 그때는 오류가 아니라 "없음" 이어야 하므로 먼저 걸러 낸다. text 로 바꿔 비교하면 같은 결과지만 idx_stacks_cluster_id 를 쓰지 못한다.
func (*PostgresStackRepository) ListCompleted ¶ added in v0.6.0
ListCompleted 는 설치가 끝난 스택을 조직과 무관하게 돌려준다.
설치 이미지 주기 재스캔이 쓴다. 오래 스캔하지 않은 순서가 아니라 갱신 순서로 도는 것은, 재스캔이 스택 레코드를 건드리지 않아 둘이 같은 순서를 뜻하지 않기 때문이다 — 한 번에 전부 돈다.
func (*PostgresStackRepository) ListInFlight ¶
ListInFlight 는 설치가 진행 중인 상태로 남아 있는 스택을 조직과 무관하게 돌려준다.
조직으로 거르지 않는다. 끊긴 설치를 찾는 일은 조직 경계와 무관하고, 거르면 조직 수만큼 조회를 반복해야 한다.
func (*PostgresStackRepository) SetYAMLOverride ¶ added in v0.6.0
func (r *PostgresStackRepository) SetYAMLOverride(ctx context.Context, stackID, key, yamlText string) error
SetYAMLOverride 는 스택 설정의 yaml_overrides 에서 키 하나만 바꾼다.
Update 는 행 전체(이름·상태·단계·config)를 덮어쓴다. 오래 걸리는 작업 뒤에 그 결과를 저장하면 그 사이 들어온 상태 전이나 다른 키의 편집을 되돌린다 — 그리고 StackConfig 에 없는 config.tools 도 지운다. 여기서는 그 키만 바꾼다.
func (*PostgresStackRepository) TouchUpdatedAt ¶
func (r *PostgresStackRepository) TouchUpdatedAt(ctx context.Context, stackID string) error
TouchUpdatedAt 은 갱신 시각만 찍는다.
끊긴 설치를 찾는 리퍼는 갱신 시각만 본다. 그런데 그 시각은 단계가 시작·완료될 때만 움직여서, 한 단계가 임계값보다 오래 걸리면 멀쩡히 도는 설치가 끊긴 것으로 표시된다 — 2026-08-21 운영에서 그렇게 됐다. 설치가 도는 동안 이것을 주기적으로 찍으면 "시각이 멈췄다" 가 "돌리던 것이 사라졌다" 를 뜻하게 된다.
func (*PostgresStackRepository) UpdateTools ¶
type PostgresTemplateRepository ¶
type PostgresTemplateRepository struct {
// contains filtered or unexported fields
}
func NewPostgresTemplateRepository ¶
func NewPostgresTemplateRepository(pool *pgxpool.Pool) *PostgresTemplateRepository
func (*PostgresTemplateRepository) Delete ¶
func (r *PostgresTemplateRepository) Delete(ctx context.Context, id string) error
type PostgresTokenSourceRegistry ¶
type PostgresTokenSourceRegistry struct {
// contains filtered or unexported fields
}
func NewPostgresTokenSourceRegistry ¶
func NewPostgresTokenSourceRegistry(pool *pgxpool.Pool, secret *secrets.Router) *PostgresTokenSourceRegistry
func (*PostgresTokenSourceRegistry) Upsert ¶
func (r *PostgresTokenSourceRegistry) Upsert(ctx context.Context, input port.TokenSourceInput) error
type PostgresUpgradeRepository ¶ added in v0.6.0
type PostgresUpgradeRepository struct {
// contains filtered or unexported fields
}
func NewPostgresUpgradeRepository ¶ added in v0.6.0
func NewPostgresUpgradeRepository(pool *pgxpool.Pool) *PostgresUpgradeRepository
func (*PostgresUpgradeRepository) ActiveRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) ActiveRun(ctx context.Context, stackID string) (*domain.UpgradeRun, error)
func (*PostgresUpgradeRepository) CloseStaleRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) CloseStaleRun(ctx context.Context, run *domain.UpgradeRun, staleBefore time.Time) (bool, error)
func (*PostgresUpgradeRepository) CreateBundle ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) CreateBundle(ctx context.Context, b *domain.UpgradeBundle) error
CreateBundle 은 기본 키와 경로 유니크 제약(tool · source · target)으로 중복을 막는다.
func (*PostgresUpgradeRepository) CreateRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) CreateRun(ctx context.Context, run *domain.UpgradeRun) error
CreateRun 은 진행 중 실행의 부분 유니크 인덱스와 Idempotency-Key 유니크 제약으로 동시 요청을 가린다. 어느 제약에 걸렸는지를 도메인 오류로 바꿔 돌려준다.
func (*PostgresUpgradeRepository) FindRunByIdempotencyKey ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) FindRunByIdempotencyKey(ctx context.Context, stackID, key string) (*domain.UpgradeRun, error)
func (*PostgresUpgradeRepository) GetBundle ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) GetBundle(ctx context.Context, id string) (*domain.UpgradeBundle, error)
func (*PostgresUpgradeRepository) GetRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) GetRun(ctx context.Context, stackID, runID string) (*domain.UpgradeRun, error)
func (*PostgresUpgradeRepository) GetVerifiedBundle ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) GetVerifiedBundle(ctx context.Context, id string) (*domain.UpgradeBundle, error)
func (*PostgresUpgradeRepository) LatestRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) LatestRun(ctx context.Context, stackID, tool string) (*domain.UpgradeRun, error)
func (*PostgresUpgradeRepository) ListBundles ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) ListBundles(ctx context.Context) ([]domain.UpgradeBundle, error)
func (*PostgresUpgradeRepository) ListRuns ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) ListRuns(ctx context.Context, stackID string, limit int) ([]domain.UpgradeRun, error)
func (*PostgresUpgradeRepository) ListVerifiedBundles ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) ListVerifiedBundles(ctx context.Context, tool, source string) ([]domain.UpgradeBundle, error)
func (*PostgresUpgradeRepository) UpdateBundleStatus ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) UpdateBundleStatus(ctx context.Context, id, status string) error
func (*PostgresUpgradeRepository) UpdateRun ¶ added in v0.6.0
func (r *PostgresUpgradeRepository) UpdateRun(ctx context.Context, run *domain.UpgradeRun) error
Source Files
¶
- kubeconfig_provider.go
- memory_compatibility.go
- memory_helm_step_metadata.go
- memory_history.go
- memory_resource_default.go
- memory_stack.go
- memory_template.go
- postgres_cluster_reader.go
- postgres_compatibility.go
- postgres_deploy_log.go
- postgres_helm_step_metadata.go
- postgres_history.go
- postgres_resource_default.go
- postgres_stack.go
- postgres_stack_image_scan.go
- postgres_template.go
- postgres_token_source_registry.go
- postgres_upgrade.go