repository

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package repository 는 backup 컨텍스트의 저장 어댑터다.

이 모듈이 소유하는 테이블만 읽고 쓴다 — backup_runs / backup_artifacts / restore_runs (CLAUDE.md 모듈별 테이블 소유 원칙).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresBackupRepository

type PostgresBackupRepository struct {
	// contains filtered or unexported fields
}

func NewPostgresBackupRepository

func NewPostgresBackupRepository(pool *pgxpool.Pool) *PostgresBackupRepository

func (*PostgresBackupRepository) AddArtifact

func (r *PostgresBackupRepository) AddArtifact(ctx context.Context, a *domain.Artifact) error

func (*PostgresBackupRepository) CreateRestore

func (r *PostgresBackupRepository) CreateRestore(ctx context.Context, run *domain.RestoreRun) error

func (*PostgresBackupRepository) CreateRun

func (*PostgresBackupRepository) DeleteArtifacts

func (r *PostgresBackupRepository) DeleteArtifacts(ctx context.Context, backupRunID string) error

DeleteArtifacts 는 산출물 기록만 지운다. backup_runs 행은 남는다 — "언제 백업이 끊겼나" 의 근거가 사라지면 안 된다 (§4.5).

func (*PostgresBackupRepository) GetRestore

func (*PostgresBackupRepository) GetRun

func (*PostgresBackupRepository) LatestRestorableBackup

func (r *PostgresBackupRepository) LatestRestorableBackup(ctx context.Context, stackID string) (time.Time, bool, error)

LatestRestorableBackup 은 스택의 마지막 복구 가능 백업이 끝난 시각이다 — 성공했고 네임스페이스 리소스 산출물(위치 · 체크섬)이 남아 있는 실행만 친다. 보존 정책이 산출물을 지운 실행은 되돌릴 수 없으므로 빠진다. 스택 모듈의 업그레이드 사전 점검이 이것을 묻는다 (stack port.UpgradeBackupLookup) — 백업 테이블은 이 모듈만 읽는다.

func (*PostgresBackupRepository) ListArtifacts

func (r *PostgresBackupRepository) ListArtifacts(ctx context.Context, backupRunID string) ([]*domain.Artifact, error)

func (*PostgresBackupRepository) ListRuns

func (r *PostgresBackupRepository) ListRuns(ctx context.Context, orgID string, limit int) ([]*domain.BackupRun, error)

func (*PostgresBackupRepository) ListRunsBySet

func (r *PostgresBackupRepository) ListRunsBySet(ctx context.Context, setID string) ([]*domain.BackupRun, error)

ListRunsBySet 은 한 세트의 실행을 만든 순서로 준다 — 플랫폼이 먼저다(domain.PlanBackupSet 의 순서).

func (*PostgresBackupRepository) ListSummaries

func (r *PostgresBackupRepository) ListSummaries(ctx context.Context, orgID string) ([]domain.RunSummary, error)

func (*PostgresBackupRepository) UpdateRestore

func (r *PostgresBackupRepository) UpdateRestore(ctx context.Context, run *domain.RestoreRun) error

func (*PostgresBackupRepository) UpdateRun

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL