Documentation
¶
Overview ¶
Package bridge 는 다른 모듈의 공개 인터페이스로만 통하는 얇은 어댑터다.
backup 모듈은 다른 모듈의 테이블을 직접 읽지 않는다 (CLAUDE.md 모듈 경계). 참조 정합성 검사(§6.4)가 token_sources 를 훑어야 하므로, admin 모듈의 공개 Repository 인터페이스를 감싸 backup 의 포트 모양으로 바꾼다.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminOrgRepo ¶
type AdminOrgRepo interface {
GetByID(ctx context.Context, id string) (*admindomain.Organization, error)
}
AdminOrgRepo 는 admin 모듈이 제공하는 조직 창구다.
admin 의 저장소는 없는 조직에 (nil, nil) 을 돌려준다 — 오류가 아니라 "없음" 이다.
type AdminTokenSourceRepo ¶
type AdminTokenSourceRepo interface {
ListSources(ctx context.Context, orgID string) ([]*admindomain.TokenSource, error)
}
AdminTokenSourceRepo 는 admin 모듈이 제공하는 창구다.
type OrganizationChecker ¶
type OrganizationChecker struct {
// contains filtered or unexported fields
}
OrganizationChecker 는 port.OrganizationChecker 를 admin 저장소로 구현한다.
func NewOrganizationChecker ¶
func NewOrganizationChecker(repo AdminOrgRepo) *OrganizationChecker
func (*OrganizationChecker) OrganizationExists ¶
OrganizationExists 는 조직이 있으면 true 다.
저장소가 배선되지 않았으면 모른다고 답한다(오류). 조용히 true 를 돌려주면 검증이 빠진 채로 통과하고, false 면 멀쩡한 조직을 거절한다 — 둘 다 조용한 실패다.
type RotationPauser ¶
type RotationPauser struct {
// contains filtered or unexported fields
}
RotationPauser 는 백업이 정지 창을 여는 동안 토큰 회전을 멈춘다.
회전은 DB 와 금고를 함께 고쳐쓰므로, 멈추지 않으면 두 산출물 사이에 시점 어긋남이 생긴다 (설계 §2.1).
func NewRotationPauser ¶
func NewRotationPauser(target pausable) *RotationPauser
type StackLister ¶
type StackLister struct {
// contains filtered or unexported fields
}
StackLister 는 port.StackLister 를 스택 저장소로 구현한다 — 백업 세트가 "조직의 모든 스택" 을 여기서 읽는다.
func NewStackLister ¶
func NewStackLister(repo StackRepo) *StackLister
func (*StackLister) ListCompletedStacks ¶
func (l *StackLister) ListCompletedStacks(ctx context.Context, orgID string) ([]domain.StackRef, error)
ListCompletedStacks 는 설치가 끝나 백업할 수 있는 스택만 준다.
설치 중·실패·롤백된 스택은 뜨지 않는다 — 반쯤 깔린 네임스페이스를 뜨면 복구가 그 반쪽을 되살리고, 네임스페이스가 없는 스택(DB 에만 남은 기록)은 어댑터가 닿을 곳이 없다. 저장소가 배선되지 않았으면 오류다 — 빈 목록을 돌려주면 "플랫폼만 뜬 세트" 가 전체 백업으로 보인다.
type StackRepo ¶
type StackRepo interface {
List(ctx context.Context, orgID string, includeDeleted bool) ([]*stackdomain.Stack, error)
}
StackRepo 는 스택 모듈이 제공하는 스택 목록 창구다(internal/stack/port.StackRepository 의 List).
type TokenSourceLister ¶
type TokenSourceLister struct {
// contains filtered or unexported fields
}
func NewTokenSourceLister ¶
func NewTokenSourceLister(repo AdminTokenSourceRepo) *TokenSourceLister
func (*TokenSourceLister) ListPaths ¶
func (l *TokenSourceLister) ListPaths(ctx context.Context, orgID string) ([]port.TokenSourceRef, error)