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
Click to show internal directories.
Click to hide internal directories.