Documentation
¶
Index ¶
- func PatchManifest(content []byte, pointer, expected, desired string) ([]byte, error)
- func ReadManifestField(content []byte, pointer string) (string, error)
- type Configuration
- type Detail
- type Gate
- type HealthReport
- type PreviewRequest
- type Promotion
- type Service
- func (s *Service) Cancel(ctx context.Context, session auth.Session, org, id string, expected int64, ...) (Promotion, error)
- func (s *Service) CheckMergeTx(ctx context.Context, tx pgx.Tx, org, repo string, snapshot forge.MergeEvidence, ...) (string, error)
- func (s *Service) Configurations(ctx context.Context, session auth.Session, org string) ([]Configuration, error)
- func (s *Service) Continue(ctx context.Context, session auth.Session, org, id, request string) (Promotion, error)
- func (s *Service) Get(ctx context.Context, session auth.Session, org, id string) (Detail, error)
- func (s *Service) List(ctx context.Context, session auth.Session, org, env, cursor string, limit int) (domain.Page[Promotion], error)
- func (s *Service) MergePreview(ctx context.Context, session auth.Session, org, id, method, request string) (mergecontrol.Gate, error)
- func (s *Service) Observe(ctx context.Context, org, id string) (Promotion, error)
- func (s *Service) ObserveAs(ctx context.Context, session auth.Session, org, id string) (Promotion, error)
- func (s *Service) Preview(ctx context.Context, session auth.Session, org, env string, in PreviewRequest, ...) (Gate, error)
- func (s *Service) PutConfiguration(ctx context.Context, session auth.Session, org string, c Configuration, ...) (Configuration, error)
- func (s *Service) ReceiveHealth(ctx context.Context, org, id string, in HealthReport, signature string) error
- func (s *Service) RegisterGateAuthority(check func(context.Context, pgx.Tx, string, string) error)
- func (s *Service) Request(ctx context.Context, session auth.Session, org, gateID, key, request string) (Promotion, error)
- func (s *Service) RequestMerge(ctx context.Context, session auth.Session, ...) (mergecontrol.Operation, error)
- func (s *Service) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchManifest ¶
Types ¶
type Configuration ¶
type Configuration struct {
Environment string `json:"environment"`
SourceRepositoryID string `json:"source_repository_id"`
DeliveryRepositoryID string `json:"delivery_repository_id"`
Version int64 `json:"version"`
Enabled bool `json:"enabled"`
TargetBranch string `json:"target_branch"`
ManifestPath string `json:"manifest_path"`
Pointer string `json:"pointer"`
ImageRepository string `json:"image_repository"`
ProvenancePublicKey string `json:"provenance_public_key"`
HealthPublicKey string `json:"health_public_key"`
HealthChecks []string `json:"health_checks"`
BuildWorkflowPath string `json:"build_workflow_path,omitempty"`
BuildWorkflowSHA256 string `json:"build_workflow_sha256,omitempty"`
ObservationSeconds int64 `json:"observation_seconds"`
MaxEvidenceAgeSeconds int64 `json:"max_evidence_age_seconds"`
DeadlineSeconds int64 `json:"deadline_seconds"`
RecoveryAllowed bool `json:"recovery_allowed"`
PromoteFrom string `json:"promote_from,omitempty"`
}
type Detail ¶
type Detail struct {
Promotion Promotion `json:"promotion"`
Gate Gate `json:"gate"`
Health *HealthReport `json:"health,omitempty"`
}
type Gate ¶
type Gate struct {
ID string `json:"id"`
OperationID string `json:"operation_id"`
Configuration Configuration `json:"configuration"`
Request PreviewRequest `json:"request"`
Source forge.RepoRef `json:"source"`
Delivery forge.RepoRef `json:"delivery"`
SourceConnectionID string `json:"source_connection_id"`
DeliveryConnectionID string `json:"delivery_connection_id"`
SourceConnectionVersion int64 `json:"source_connection_version"`
DeliveryConnectionVersion int64 `json:"delivery_connection_version"`
SourcePolicyHash string `json:"source_policy_hash"`
DeliveryPolicyHash string `json:"delivery_policy_hash"`
TargetSHA string `json:"target_sha"`
Before string `json:"before"`
After string `json:"after"`
ManifestSHA256 string `json:"manifest_sha256"`
PatchedManifest []byte `json:"patched_manifest"`
Decision policy.Result `json:"decision"`
Blockers []string `json:"blockers"`
ExpiresAt time.Time `json:"expires_at"`
}
type HealthReport ¶
type HealthReport struct {
OrgID string `json:"org_id"`
PromotionID string `json:"promotion_id"`
Environment string `json:"environment"`
ConfigurationVersion int64 `json:"configuration_version"`
SourceSHA string `json:"source_sha"`
ArtifactDigest string `json:"artifact_digest"`
DeliveryRevision string `json:"delivery_revision"`
Healthy bool `json:"healthy"`
Checks map[string]bool `json:"checks"`
ObservedAt time.Time `json:"observed_at"`
Nonce string `json:"nonce"`
}
type PreviewRequest ¶
type PreviewRequest struct {
ChangeID string `json:"change_id"`
SourceSHA string `json:"source_sha"`
ArtifactDigest string `json:"artifact_digest"`
Provenance deployment.SignedProvenance `json:"provenance"`
RecoveryOf string `json:"recovery_of,omitempty"`
RestorePromotionID string `json:"restore_promotion_id,omitempty"`
}
type Promotion ¶
type Promotion struct {
CancelRequested bool `json:"cancel_requested"`
ID string `json:"id"`
Environment string `json:"environment"`
SourceRepositoryID string `json:"source_repository_id"`
DeliveryRepositoryID string `json:"delivery_repository_id"`
GateID string `json:"gate_id"`
State string `json:"state"`
Reason string `json:"reason"`
Version int64 `json:"version"`
RequestedBy string `json:"requested_by"`
Branch string `json:"branch"`
CandidateSHA string `json:"candidate_sha"`
Change *forge.Change `json:"change,omitempty"`
MergeSHA string `json:"merge_sha"`
RecoveryOf string `json:"recovery_of,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CheckMergeTx ¶
func (*Service) Configurations ¶
func (*Service) MergePreview ¶
func (*Service) PutConfiguration ¶
func (*Service) ReceiveHealth ¶
func (*Service) RegisterGateAuthority ¶
func (*Service) RequestMerge ¶
Click to show internal directories.
Click to hide internal directories.