handler

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamCicdLogs

func StreamCicdLogs(c echo.Context, tracker *kube.StepTracker) error

Types

type CICDGoldenPathHandler

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

CICDGoldenPathHandler handles HTTP requests for CI/CD Golden Path operations.

func NewCICDGoldenPathHandler

func NewCICDGoldenPathHandler(goldenPathRepo port.CICDGoldenPathRepository) *CICDGoldenPathHandler

NewCICDGoldenPathHandler constructs a CICDGoldenPathHandler.

func (*CICDGoldenPathHandler) CreateGoldenPath

func (h *CICDGoldenPathHandler) CreateGoldenPath(c echo.Context) error

CreateGoldenPath handles POST /api/v1/cicd/golden-paths.

func (*CICDGoldenPathHandler) DeleteGoldenPath

func (h *CICDGoldenPathHandler) DeleteGoldenPath(c echo.Context) error

DeleteGoldenPath handles DELETE /api/v1/cicd/golden-paths/:id.

func (*CICDGoldenPathHandler) GetGoldenPath

func (h *CICDGoldenPathHandler) GetGoldenPath(c echo.Context) error

GetGoldenPath handles GET /api/v1/cicd/golden-paths/:id.

func (*CICDGoldenPathHandler) ListGoldenPaths

func (h *CICDGoldenPathHandler) ListGoldenPaths(c echo.Context) error

ListGoldenPaths handles GET /api/v1/cicd/golden-paths.

func (*CICDGoldenPathHandler) RegisterRoutes

func (h *CICDGoldenPathHandler) RegisterRoutes(g *echo.Group)

RegisterRoutes registers CI/CD Golden Path routes on the given Echo group.

func (*CICDGoldenPathHandler) UpdateGoldenPath

func (h *CICDGoldenPathHandler) UpdateGoldenPath(c echo.Context) error

UpdateGoldenPath handles PUT /api/v1/cicd/golden-paths/:id.

type CICDTemplateHandler

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

CICDTemplateHandler handles HTTP requests for CI/CD pipeline template operations.

func NewCICDTemplateHandler

func NewCICDTemplateHandler(templateRepo port.PipelineTemplateRepository) *CICDTemplateHandler

NewCICDTemplateHandler constructs a CICDTemplateHandler.

func (*CICDTemplateHandler) CreateTemplate

func (h *CICDTemplateHandler) CreateTemplate(c echo.Context) error

CreateTemplate handles POST /api/v1/cicd/templates.

func (*CICDTemplateHandler) DeleteTemplate

func (h *CICDTemplateHandler) DeleteTemplate(c echo.Context) error

DeleteTemplate handles DELETE /api/v1/cicd/templates/:id.

func (*CICDTemplateHandler) GetTemplate

func (h *CICDTemplateHandler) GetTemplate(c echo.Context) error

GetTemplate handles GET /api/v1/cicd/templates/:id.

func (*CICDTemplateHandler) ListTemplates

func (h *CICDTemplateHandler) ListTemplates(c echo.Context) error

ListTemplates handles GET /api/v1/cicd/templates.

func (*CICDTemplateHandler) RegisterRoutes

func (h *CICDTemplateHandler) RegisterRoutes(g *echo.Group)

RegisterRoutes registers CI/CD template routes on the given Echo group.

func (*CICDTemplateHandler) UpdateTemplate

func (h *CICDTemplateHandler) UpdateTemplate(c echo.Context) error

UpdateTemplate handles PUT /api/v1/cicd/templates/:id.

type PipelineHandler

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

PipelineHandler handles HTTP requests for pipeline operations.

func NewPipelineHandler

func NewPipelineHandler(
	createPipeline *usecase.CreatePipeline,
	listPipelines *usecase.ListPipelines,
	deployPipeline *usecase.DeployPipeline,
	pipelineRepo port.PipelineRepository,
	deploymentRepo port.DeploymentRepository,
	kubeconfigProvider port.KubeconfigProvider,
	stepTracker *kube.StepTracker,
	pool *pgxpool.Pool,
) *PipelineHandler

NewPipelineHandler constructs a PipelineHandler.

func (*PipelineHandler) CreatePipeline

func (h *PipelineHandler) CreatePipeline(c echo.Context) error

CreatePipeline handles POST /api/v1/pipelines.

func (*PipelineHandler) DeletePipeline

func (h *PipelineHandler) DeletePipeline(c echo.Context) error

DeletePipeline handles DELETE /api/v1/cicd/pipelines/:id.

부수 리소스 삭제는 쿼리 파라미터로 각각 켠다. 기본값은 전부 끔이다 — 종전 동작(레코드만 삭제)을 유지하고, 되돌릴 수 없는 일은 명시적으로 요청받는다.

?cluster_resources=true  Argo CD Application 과 배포된 워크로드
?repository=true         소스 저장소
?images=true             레지스트리의 이미지 저장소

func (*PipelineHandler) DeployApp

func (h *PipelineHandler) DeployApp(c echo.Context) error

func (*PipelineHandler) DeployPipeline

func (h *PipelineHandler) DeployPipeline(c echo.Context) error

DeployPipeline handles POST /api/v1/pipelines/:id/deploy.

func (*PipelineHandler) GetDeployment

func (h *PipelineHandler) GetDeployment(c echo.Context) error

GetDeployment handles GET /api/v1/deployments/:id.

func (*PipelineHandler) GetPipelineResources

func (h *PipelineHandler) GetPipelineResources(c echo.Context) error

func (*PipelineHandler) ListAppTemplates

func (h *PipelineHandler) ListAppTemplates(c echo.Context) error

func (*PipelineHandler) ListDeployments

func (h *PipelineHandler) ListDeployments(c echo.Context) error

func (*PipelineHandler) ListPipelines

func (h *PipelineHandler) ListPipelines(c echo.Context) error

func (*PipelineHandler) ListPipelinesByStack

func (h *PipelineHandler) ListPipelinesByStack(c echo.Context) error

ListPipelinesByStack handles GET /api/v1/stacks/:stackId/pipelines. Returns all pipelines linked to the given stack.

func (*PipelineHandler) RegisterRoutes

func (h *PipelineHandler) RegisterRoutes(g *echo.Group)

RegisterRoutes registers pipeline routes on the given Echo group.

func (*PipelineHandler) RegisterStackRoutes

func (h *PipelineHandler) RegisterStackRoutes(g *echo.Group)

RegisterStackRoutes registers pipeline routes under the /stacks group. This allows GET /api/v1/stacks/:stackId/pipelines without the Stack module importing the CI/CD module.

func (*PipelineHandler) StreamDeployLogs

func (h *PipelineHandler) StreamDeployLogs(c echo.Context) error

func (*PipelineHandler) WithDeletePipeline

func (h *PipelineHandler) WithDeletePipeline(uc *usecase.DeletePipeline) *PipelineHandler

WithDeletePipeline 은 부수 리소스 삭제 경로를 배선한다.

func (*PipelineHandler) WithManifestApplier

func (h *PipelineHandler) WithManifestApplier(a port.ManifestApplier) *PipelineHandler

WithManifestApplier 는 직접 배포의 적용 경로를 배선한다.

func (*PipelineHandler) WithRunSync

WithRunSync 는 CI 서버의 빌드 이력을 들이는 경로를 배선한다.

없으면 GitOps 경로(CI 가 빌드하고 Argo CD 가 배포)의 실행 통계가 비어 있는 채로 남는다 — 플랫폼이 직접 실행한 배포만 기록에 남기 때문이다.

func (*PipelineHandler) WithStackReader

func (h *PipelineHandler) WithStackReader(r port.StackReader) *PipelineHandler

WithStackReader 는 스택 요약 조회를 배선한다.

파이프라인 배포(DeployPipeline)와 직접 배포(DeployApp)가 같은 주소를 넣어야 한다 — 한쪽만 배선하면 배포 경로에 따라 추적이 되기도 하고 안 되기도 한다.

Jump to

Keyboard shortcuts

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