plans

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSourceBranchChanged = errors.New("source branch changed")
)

Functions

func FormatPlanComment

func FormatPlanComment(deployment model.Deployment) string

FormatPlanComment formata o output do terraform plan em markdown para comentário no PR Mostra apenas summary para evitar problemas com caracteres especiais

Types

type PlansController

type PlansController struct {
	Persistence ports.Persistence
	Config      config.Config
	SCM         scm.Client
	AsyncEngine *async.Engine
}

PlansController handles plan registration from CLI When CLI runs terraform plan successfully, it calls this endpoint

func NewPlansController

func NewPlansController(persistence ports.Persistence, config config.Config, scmClient scm.Client, engine *async.Engine) *PlansController

NewPlansController creates a new plans controller

func (*PlansController) Approve

func (c *PlansController) Approve(w http.ResponseWriter, r *http.Request)

func (*PlansController) ClosePlan

func (c *PlansController) ClosePlan(w http.ResponseWriter, r *http.Request)

ClosePlan marca o deployment como fechado, faz merge do PR e libera os locks POST /api/v1/plans/close

func (*PlansController) RegisterPlan

func (c *PlansController) RegisterPlan(w http.ResponseWriter, r *http.Request)

RegisterPlan registra que um terraform plan foi executado POST /api/v1/plans

IDEMPOTENTE: Se deployment já existe para este PR, atualiza em vez de criar novo

Jump to

Keyboard shortcuts

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