repository

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

Create stores a new golden path.

func (*MemoryCICDGoldenPathRepository) Delete

Delete removes a golden path by ID.

func (*MemoryCICDGoldenPathRepository) GetByID

GetByID returns the golden path with the given ID.

func (*MemoryCICDGoldenPathRepository) List

List returns all available CI/CD Golden Path templates.

func (*MemoryCICDGoldenPathRepository) Update

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

Create stores a new pipeline template.

func (*MemoryCICDTemplateRepository) Delete

Delete removes a pipeline template by ID.

func (*MemoryCICDTemplateRepository) GetByID

GetByID returns the template with the given ID.

func (*MemoryCICDTemplateRepository) List

List returns all available CI/CD pipeline templates.

func (*MemoryCICDTemplateRepository) Update

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

Create stores a new deployment.

func (*MemoryDeploymentRepository) GetByID

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

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) Create

Create stores a new pipeline.

func (*MemoryPipelineRepository) Delete

Delete removes a pipeline by ID. No-op when the pipeline does not exist so callers can idempotently clean up.

func (*MemoryPipelineRepository) GetByID

GetByID retrieves a pipeline by its ID.

func (*MemoryPipelineRepository) List

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.

func (*MemoryPipelineRepository) Update

Update persists changes to an existing pipeline.

type PostgresCICDTemplateRepository

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

func NewPostgresCICDTemplateRepository

func NewPostgresCICDTemplateRepository(pool *pgxpool.Pool) *PostgresCICDTemplateRepository

func (*PostgresCICDTemplateRepository) Create

Create inserts a new pipeline template into the database. TODO: implement when pipeline_templates table supports mutations.

func (*PostgresCICDTemplateRepository) Delete

Delete removes a pipeline template from the database. TODO: implement when pipeline_templates table supports mutations.

func (*PostgresCICDTemplateRepository) GetByID

func (*PostgresCICDTemplateRepository) List

func (*PostgresCICDTemplateRepository) Update

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 (*PostgresDeploymentRepository) GetByID

func (*PostgresDeploymentRepository) ListByPipelineID

func (r *PostgresDeploymentRepository) ListByPipelineID(ctx context.Context, pipelineID string) ([]*domain.Deployment, error)

func (*PostgresDeploymentRepository) Update

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) Create

Create inserts a new pipeline record.

func (*PostgresPipelineRepository) Delete

Delete removes a pipeline by ID. Cascades to pipeline_deployments via FK.

func (*PostgresPipelineRepository) GetByID

GetByID retrieves a pipeline by its ID.

func (*PostgresPipelineRepository) List

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.

func (*PostgresPipelineRepository) Update

Update persists changes to an existing pipeline.

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.

Jump to

Keyboard shortcuts

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