Documentation
¶
Index ¶
- type MemoryCICDGoldenPathRepository
- func (r *MemoryCICDGoldenPathRepository) Create(_ context.Context, goldenPath *domain.CICDGoldenPath) error
- func (r *MemoryCICDGoldenPathRepository) Delete(_ context.Context, id string) error
- func (r *MemoryCICDGoldenPathRepository) GetByID(_ context.Context, id string) (*domain.CICDGoldenPath, error)
- func (r *MemoryCICDGoldenPathRepository) List(_ context.Context) ([]*domain.CICDGoldenPath, error)
- func (r *MemoryCICDGoldenPathRepository) Update(_ context.Context, goldenPath *domain.CICDGoldenPath) error
- type MemoryCICDTemplateRepository
- func (r *MemoryCICDTemplateRepository) Create(_ context.Context, tmpl *domain.PipelineTemplate) error
- func (r *MemoryCICDTemplateRepository) Delete(_ context.Context, id string) error
- func (r *MemoryCICDTemplateRepository) GetByID(_ context.Context, id string) (*domain.PipelineTemplate, error)
- func (r *MemoryCICDTemplateRepository) List(_ context.Context) ([]*domain.PipelineTemplate, error)
- func (r *MemoryCICDTemplateRepository) Update(_ context.Context, tmpl *domain.PipelineTemplate) error
- type MemoryDeploymentRepository
- func (r *MemoryDeploymentRepository) Create(_ context.Context, d *domain.Deployment) error
- func (r *MemoryDeploymentRepository) GetByID(_ context.Context, id string) (*domain.Deployment, error)
- func (r *MemoryDeploymentRepository) ListByPipelineID(_ context.Context, pipelineID string) ([]*domain.Deployment, error)
- func (r *MemoryDeploymentRepository) Update(_ context.Context, d *domain.Deployment) error
- type MemoryPipelineRepository
- func (r *MemoryPipelineRepository) Create(_ context.Context, p *domain.Pipeline) error
- func (r *MemoryPipelineRepository) Delete(_ context.Context, id string) error
- func (r *MemoryPipelineRepository) GetByID(_ context.Context, id string) (*domain.Pipeline, error)
- func (r *MemoryPipelineRepository) List(_ context.Context, orgID string) ([]*domain.Pipeline, error)
- func (r *MemoryPipelineRepository) ListByStackID(_ context.Context, stackID string) ([]*domain.Pipeline, error)
- func (r *MemoryPipelineRepository) Update(_ context.Context, p *domain.Pipeline) error
- type PostgresCICDTemplateRepository
- func (r *PostgresCICDTemplateRepository) Create(_ context.Context, tmpl *domain.PipelineTemplate) error
- func (r *PostgresCICDTemplateRepository) Delete(_ context.Context, id string) error
- func (r *PostgresCICDTemplateRepository) GetByID(ctx context.Context, id string) (*domain.PipelineTemplate, error)
- func (r *PostgresCICDTemplateRepository) List(ctx context.Context) ([]*domain.PipelineTemplate, error)
- func (r *PostgresCICDTemplateRepository) Update(_ context.Context, tmpl *domain.PipelineTemplate) error
- type PostgresClusterTargetProvider
- type PostgresDeploymentRepository
- func (r *PostgresDeploymentRepository) Create(ctx context.Context, d *domain.Deployment) error
- func (r *PostgresDeploymentRepository) GetByID(ctx context.Context, id string) (*domain.Deployment, error)
- func (r *PostgresDeploymentRepository) ListByPipelineID(ctx context.Context, pipelineID string) ([]*domain.Deployment, error)
- func (r *PostgresDeploymentRepository) Update(ctx context.Context, d *domain.Deployment) error
- type PostgresPipelineRepository
- func (r *PostgresPipelineRepository) Create(ctx context.Context, p *domain.Pipeline) error
- func (r *PostgresPipelineRepository) Delete(ctx context.Context, id string) error
- func (r *PostgresPipelineRepository) GetByID(ctx context.Context, id string) (*domain.Pipeline, error)
- func (r *PostgresPipelineRepository) List(ctx context.Context, orgID string) ([]*domain.Pipeline, error)
- func (r *PostgresPipelineRepository) ListByStackID(ctx context.Context, stackID string) ([]*domain.Pipeline, error)
- func (r *PostgresPipelineRepository) Update(ctx context.Context, p *domain.Pipeline) error
- type PostgresSCMConnectionReader
- type PostgresStackReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCICDGoldenPathRepository ¶
type MemoryCICDGoldenPathRepository struct {
// contains filtered or unexported fields
}
MemoryCICDGoldenPathRepository is an in-memory implementation of port.CICDGoldenPathRepository with three hard-coded CI/CD Golden Path templates.
func NewMemoryCICDGoldenPathRepository ¶
func NewMemoryCICDGoldenPathRepository() *MemoryCICDGoldenPathRepository
NewMemoryCICDGoldenPathRepository constructs a MemoryCICDGoldenPathRepository with three canonical CI/CD Golden Path templates pre-loaded.
func (*MemoryCICDGoldenPathRepository) Create ¶
func (r *MemoryCICDGoldenPathRepository) Create(_ context.Context, goldenPath *domain.CICDGoldenPath) error
Create stores a new golden path.
func (*MemoryCICDGoldenPathRepository) Delete ¶
func (r *MemoryCICDGoldenPathRepository) Delete(_ context.Context, id string) error
Delete removes a golden path by ID.
func (*MemoryCICDGoldenPathRepository) GetByID ¶
func (r *MemoryCICDGoldenPathRepository) GetByID(_ context.Context, id string) (*domain.CICDGoldenPath, error)
GetByID returns the golden path with the given ID.
func (*MemoryCICDGoldenPathRepository) List ¶
func (r *MemoryCICDGoldenPathRepository) List(_ context.Context) ([]*domain.CICDGoldenPath, error)
List returns all available CI/CD Golden Path templates.
func (*MemoryCICDGoldenPathRepository) Update ¶
func (r *MemoryCICDGoldenPathRepository) Update(_ context.Context, goldenPath *domain.CICDGoldenPath) error
Update replaces an existing golden path.
type MemoryCICDTemplateRepository ¶
type MemoryCICDTemplateRepository struct {
// contains filtered or unexported fields
}
MemoryCICDTemplateRepository is an in-memory implementation of port.PipelineTemplateRepository with hard-coded CI/CD pipeline templates.
func NewMemoryCICDTemplateRepository ¶
func NewMemoryCICDTemplateRepository() *MemoryCICDTemplateRepository
NewMemoryCICDTemplateRepository constructs a MemoryCICDTemplateRepository with canonical CI/CD pipeline templates pre-loaded.
func (*MemoryCICDTemplateRepository) Create ¶
func (r *MemoryCICDTemplateRepository) Create(_ context.Context, tmpl *domain.PipelineTemplate) error
Create stores a new pipeline template.
func (*MemoryCICDTemplateRepository) Delete ¶
func (r *MemoryCICDTemplateRepository) Delete(_ context.Context, id string) error
Delete removes a pipeline template by ID.
func (*MemoryCICDTemplateRepository) GetByID ¶
func (r *MemoryCICDTemplateRepository) GetByID(_ context.Context, id string) (*domain.PipelineTemplate, error)
GetByID returns the template with the given ID.
func (*MemoryCICDTemplateRepository) List ¶
func (r *MemoryCICDTemplateRepository) List(_ context.Context) ([]*domain.PipelineTemplate, error)
List returns all available CI/CD pipeline templates.
func (*MemoryCICDTemplateRepository) Update ¶
func (r *MemoryCICDTemplateRepository) Update(_ context.Context, tmpl *domain.PipelineTemplate) error
Update replaces an existing pipeline template.
type MemoryDeploymentRepository ¶
type MemoryDeploymentRepository struct {
// contains filtered or unexported fields
}
MemoryDeploymentRepository is an in-memory implementation of port.DeploymentRepository.
func NewMemoryDeploymentRepository ¶
func NewMemoryDeploymentRepository() *MemoryDeploymentRepository
NewMemoryDeploymentRepository constructs an empty MemoryDeploymentRepository.
func (*MemoryDeploymentRepository) Create ¶
func (r *MemoryDeploymentRepository) Create(_ context.Context, d *domain.Deployment) error
Create stores a new deployment.
func (*MemoryDeploymentRepository) GetByID ¶
func (r *MemoryDeploymentRepository) GetByID(_ context.Context, id string) (*domain.Deployment, error)
GetByID retrieves a deployment by its ID.
func (*MemoryDeploymentRepository) ListByPipelineID ¶
func (r *MemoryDeploymentRepository) ListByPipelineID(_ context.Context, pipelineID string) ([]*domain.Deployment, error)
ListByPipelineID returns all deployments for a given pipeline.
func (*MemoryDeploymentRepository) Update ¶
func (r *MemoryDeploymentRepository) Update(_ context.Context, d *domain.Deployment) error
Update persists changes to an existing deployment.
type MemoryPipelineRepository ¶
type MemoryPipelineRepository struct {
// contains filtered or unexported fields
}
MemoryPipelineRepository is an in-memory implementation of port.PipelineRepository.
func NewMemoryPipelineRepository ¶
func NewMemoryPipelineRepository() *MemoryPipelineRepository
NewMemoryPipelineRepository constructs an empty MemoryPipelineRepository.
func (*MemoryPipelineRepository) Delete ¶
func (r *MemoryPipelineRepository) Delete(_ context.Context, id string) error
Delete removes a pipeline by ID. No-op when the pipeline does not exist so callers can idempotently clean up.
func (*MemoryPipelineRepository) List ¶
func (r *MemoryPipelineRepository) List(_ context.Context, orgID string) ([]*domain.Pipeline, error)
List returns all pipelines for an organization.
func (*MemoryPipelineRepository) ListByStackID ¶
func (r *MemoryPipelineRepository) ListByStackID(_ context.Context, stackID string) ([]*domain.Pipeline, error)
ListByStackID returns all pipelines linked to a specific stack.
type PostgresCICDTemplateRepository ¶
type PostgresCICDTemplateRepository struct {
// contains filtered or unexported fields
}
func NewPostgresCICDTemplateRepository ¶
func NewPostgresCICDTemplateRepository(pool *pgxpool.Pool) *PostgresCICDTemplateRepository
func (*PostgresCICDTemplateRepository) Create ¶
func (r *PostgresCICDTemplateRepository) Create(_ context.Context, tmpl *domain.PipelineTemplate) error
Create inserts a new pipeline template into the database. TODO: implement when pipeline_templates table supports mutations.
func (*PostgresCICDTemplateRepository) Delete ¶
func (r *PostgresCICDTemplateRepository) Delete(_ context.Context, id string) error
Delete removes a pipeline template from the database. TODO: implement when pipeline_templates table supports mutations.
func (*PostgresCICDTemplateRepository) GetByID ¶
func (r *PostgresCICDTemplateRepository) GetByID(ctx context.Context, id string) (*domain.PipelineTemplate, error)
func (*PostgresCICDTemplateRepository) List ¶
func (r *PostgresCICDTemplateRepository) List(ctx context.Context) ([]*domain.PipelineTemplate, error)
func (*PostgresCICDTemplateRepository) Update ¶
func (r *PostgresCICDTemplateRepository) Update(_ context.Context, tmpl *domain.PipelineTemplate) error
Update modifies an existing pipeline template in the database. TODO: implement when pipeline_templates table supports mutations.
type PostgresClusterTargetProvider ¶
type PostgresClusterTargetProvider struct {
// contains filtered or unexported fields
}
func NewPostgresClusterTargetProvider ¶
func NewPostgresClusterTargetProvider(pool *pgxpool.Pool, encryptionKey []byte) *PostgresClusterTargetProvider
func (*PostgresClusterTargetProvider) GetTarget ¶
func (p *PostgresClusterTargetProvider) GetTarget(ctx context.Context, clusterID string) (*port.ClusterTarget, error)
type PostgresDeploymentRepository ¶
type PostgresDeploymentRepository struct {
// contains filtered or unexported fields
}
func NewPostgresDeploymentRepository ¶
func NewPostgresDeploymentRepository(pool *pgxpool.Pool) *PostgresDeploymentRepository
func (*PostgresDeploymentRepository) Create ¶
func (r *PostgresDeploymentRepository) Create(ctx context.Context, d *domain.Deployment) error
func (*PostgresDeploymentRepository) GetByID ¶
func (r *PostgresDeploymentRepository) GetByID(ctx context.Context, id string) (*domain.Deployment, error)
func (*PostgresDeploymentRepository) ListByPipelineID ¶
func (r *PostgresDeploymentRepository) ListByPipelineID(ctx context.Context, pipelineID string) ([]*domain.Deployment, error)
func (*PostgresDeploymentRepository) Update ¶
func (r *PostgresDeploymentRepository) Update(ctx context.Context, d *domain.Deployment) error
type PostgresPipelineRepository ¶
type PostgresPipelineRepository struct {
// contains filtered or unexported fields
}
PostgresPipelineRepository implements port.PipelineRepository using pgx.
func NewPostgresPipelineRepository ¶
func NewPostgresPipelineRepository(pool *pgxpool.Pool) *PostgresPipelineRepository
NewPostgresPipelineRepository constructs a PostgresPipelineRepository.
func (*PostgresPipelineRepository) Delete ¶
func (r *PostgresPipelineRepository) Delete(ctx context.Context, id string) error
Delete removes a pipeline by ID. Cascades to pipeline_deployments via FK.
func (*PostgresPipelineRepository) GetByID ¶
func (r *PostgresPipelineRepository) GetByID(ctx context.Context, id string) (*domain.Pipeline, error)
GetByID retrieves a pipeline by its ID.
func (*PostgresPipelineRepository) List ¶
func (r *PostgresPipelineRepository) List(ctx context.Context, orgID string) ([]*domain.Pipeline, error)
List returns all pipelines belonging to an organization.
func (*PostgresPipelineRepository) ListByStackID ¶
func (r *PostgresPipelineRepository) ListByStackID(ctx context.Context, stackID string) ([]*domain.Pipeline, error)
ListByStackID returns all pipelines linked to a specific stack.
type PostgresSCMConnectionReader ¶
type PostgresSCMConnectionReader struct {
// contains filtered or unexported fields
}
PostgresSCMConnectionReader 는 port.SCMConnectionReader 를 token_sources 테이블로 구현한다.
외부 SCM 은 토큰과 접속 정보가 한 벌로 묶여야 의미가 있다 — 토큰만 있고 organization 을 모르면 어디에 리포를 만들지 알 수 없다. 그래서 관리자가 토큰을 등록하는 곳(token_sources)의 metadata 에 함께 둔다.
admin 모듈이 소유한 테이블을 직접 읽는다. Modular Monolith 안에서는 허용되는 절충이며, 읽기 전용 포트로 좁혀 두었으므로 마이크로서비스로 쪼갤 때는 이 구현만 HTTP 클라이언트로 바꾸면 된다.
func NewPostgresSCMConnectionReader ¶
func NewPostgresSCMConnectionReader(pool *pgxpool.Pool) *PostgresSCMConnectionReader
NewPostgresSCMConnectionReader 는 리더를 만든다.
func (*PostgresSCMConnectionReader) GetConnection ¶
func (r *PostgresSCMConnectionReader) GetConnection( ctx context.Context, orgID string, platform port.SCMPlatform, ) (*port.SCMConnection, error)
GetConnection 은 조직에 등록된 SCM 연동 설정을 읽는다.
등록된 것이 없으면 nil, nil 이다 — 호출부가 "무엇을 등록해야 하는지" 안내를 띄울 수 있게 오류와 구분한다.
type PostgresStackReader ¶
type PostgresStackReader struct {
// contains filtered or unexported fields
}
PostgresStackReader implements port.StackReader by querying the stacks table directly. This is acceptable within a Modular Monolith since both modules share the same database. When splitting into microservices, replace this with an HTTP/gRPC client calling the Stack service.
func NewPostgresStackReader ¶
func NewPostgresStackReader(pool *pgxpool.Pool) *PostgresStackReader
NewPostgresStackReader constructs a PostgresStackReader.
func (*PostgresStackReader) GetStackSummary ¶
func (r *PostgresStackReader) GetStackSummary(ctx context.Context, stackID string) (*port.StackSummary, error)
GetStackSummary retrieves minimal stack information by ID. Returns nil and no error if the stack does not exist.