Documentation
¶
Index ¶
- Constants
- type ApproveRequest
- type ApproveResponse
- type ClosePlanRequest
- type ClosePlanResponse
- type CreateRepositoryRequest
- type CreateRepositoryResponse
- type CredentialsRequest
- type CredentialsResponse
- type RegisterPlanRequest
- type RegisterPlanResponse
- type RegisterRepoRequest
- type RegisterRepoResponse
Constants ¶
View Source
const ( ModePlan = "plan" ModeApply = "apply" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApproveRequest ¶
type ApproveResponse ¶
type ClosePlanRequest ¶
type ClosePlanResponse ¶
type CreateRepositoryRequest ¶
type CreateRepositoryRequest struct {
Provider string `json:"provider"` // azure, github, gitlab (obrigatório)
Identifier string `json:"identifier"` // URI ou ID nativo do repositório (obrigatório)
}
CreateRepositoryRequest é o payload para registrar um novo repositório POST /admin/repositories
type CreateRepositoryResponse ¶
type CreateRepositoryResponse struct {
model.RepositoryMetadata // embedding - todos os campos do metadata
RepoSecret string `json:"repo_secret,omitempty"` // K_r derivado (só no POST)
PlanSecret string `json:"plan_secret,omitempty"`
ApplySecret string `json:"apply_secret,omitempty"`
Instruction string `json:"instruction,omitempty"` // Instrução para o usuário
CreatedNew bool `json:"created_new"` // true se criou novo, false se já existia
}
CreateRepositoryResponse retorna os dados do repositório registrado
type CredentialsRequest ¶
type CredentialsRequest struct {
hmac.Signature // ← EMBEDDING = sem duplicação de Timestamp/SignatureRequest
Mode string `json:"mode"`
Repo string `json:"repo"`
PRNumber string `json:"pr_number,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
SourceBranchSHA string `json:"source_branch_sha,omitempty"`
SourceBranch string `json:"source_branch,omitempty"`
TargetBranch string `json:"target_branch,omitempty"`
Stacks []string `json:"stacks,omitempty"`
JobID string `json:"job_id,omitempty"`
JobToken string `json:"job_token,omitempty"`
}
CredentialsRequest usa composition com SecureRequest Campos Timestamp e SignatureRequest vêm de SecureRequest (promoted fields)
type CredentialsResponse ¶
type RegisterPlanRequest ¶
type RegisterPlanRequest struct {
hmac.Signature // ← EMBEDDING = sem duplicação de Timestamp/SignatureRequest
Repo string `json:"repo"`
PRNumber int `json:"pr_number"`
SourceBranch string `json:"source_branch"`
TargetBranch string `json:"target_branch"`
HeadSHA string `json:"head_sha"`
SourceBranchSHA string `json:"source_branch_sha,omitempty"` // SHA do tip da branch de origem (não o merge commit)
PlanOutput string `json:"plan_output"`
Stacks []string `json:"stacks"`
User string `json:"user"`
}
RegisterPlanRequest usa composition com SecureRequest Campos Timestamp e SignatureRequest vêm de SecureRequest (promoted fields)
func (*RegisterPlanRequest) Validate ¶
func (r *RegisterPlanRequest) Validate() bool
type RegisterPlanResponse ¶
type RegisterRepoRequest ¶
type RegisterRepoRequest struct {
Name string `json:"name"` // Ex: "minha-org/infra-repo" ou URI
Provider string `json:"provider,omitempty"`
}
RegisterRepoRequest é o formato antigo (deprecated) Mantido apenas para referência - será removido
type RegisterRepoResponse ¶
type RegisterRepoResponse struct {
RepoID string `json:"repo_id"` // UUID armazenado
RepoSecret string `json:"repo_secret"` // K_r (Chave derivada)
Instruction string `json:"instruction"`
}
RegisterRepoResponse é o formato antigo (deprecated)
Click to show internal directories.
Click to hide internal directories.