Documentation
¶
Index ¶
- func ValidProvenance(cfg Configuration, org string, in PreviewRequest, now time.Time) bool
- func VerifySignature(key string, document any, signature string) bool
- type Configuration
- type Detail
- type Gate
- type HealthReport
- type Operation
- type PreviewRequest
- type Provenance
- type Qualification
- type Service
- func (s *Service) Cancel(ctx context.Context, session auth.Session, org, id string, expected int64, ...) (Operation, 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) (Operation, 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, repo, env, cursor string, ...) (domain.Page[Operation], error)
- func (s *Service) Observe(ctx context.Context, org, id string) (Operation, error)
- func (s *Service) ObserveAs(ctx context.Context, session auth.Session, org, id string) (Operation, error)
- func (s *Service) Preview(ctx context.Context, session auth.Session, org, environment string, ...) (Gate, error)
- func (s *Service) PutConfiguration(ctx context.Context, session auth.Session, org string, in 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) (Operation, error)
- func (s *Service) Run(ctx context.Context) error
- func (s *Service) Track(ctx context.Context, session auth.Session, org, environment string, ...) (Operation, error)
- func (s *Service) Workflows(ctx context.Context, session auth.Session, org, repo string) ([]forge.Workflow, error)
- type SignedProvenance
- type TrackRequest
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidProvenance ¶
func ValidProvenance(cfg Configuration, org string, in PreviewRequest, now time.Time) bool
Types ¶
type Configuration ¶
type Configuration struct {
NativeEnvironment string `json:"native_environment"`
Environment string `json:"environment"`
RepositoryID string `json:"repository_id"`
Version int64 `json:"version"`
Enabled bool `json:"enabled"`
Mode string `json:"mode"`
Workflow Workflow `json:"workflow"`
RecoveryWorkflow *Workflow `json:"recovery_workflow,omitempty"`
ProvenancePublicKey string `json:"provenance_public_key"`
HealthPublicKey string `json:"health_public_key"`
HealthChecks []string `json:"health_checks"`
ObservationSeconds int64 `json:"observation_seconds"`
MaxEvidenceAgeSeconds int64 `json:"max_evidence_age_seconds"`
DeadlineSeconds int64 `json:"deadline_seconds"`
Qualification Qualification `json:"qualification"`
}
type Detail ¶
type Detail struct {
Health *HealthReport `json:"health,omitempty"`
Operation Operation `json:"operation"`
Gate Gate `json:"gate"`
}
type Gate ¶
type Gate struct {
ID string `json:"id"`
Environment string `json:"environment"`
RepositoryID string `json:"repository_id"`
ConnectionID string `json:"connection_id"`
ConnectionVersion int64 `json:"connection_version"`
ConfigurationVersion int64 `json:"configuration_version"`
Request PreviewRequest `json:"request"`
Pipeline forge.PipelineRequest `json:"pipeline"`
Native forge.DeploymentGates `json:"native"`
Binding policy.Binding `json:"binding"`
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"`
DeploymentID string `json:"deployment_id"`
Environment string `json:"environment"`
ConfigurationVersion int64 `json:"configuration_version"`
SourceSHA string `json:"source_sha"`
ArtifactDigest string `json:"artifact_digest"`
RunID string `json:"run_id"`
RunAttempt int64 `json:"run_attempt"`
Revision string `json:"revision"`
Healthy bool `json:"healthy"`
Checks map[string]bool `json:"checks"`
ObservedAt time.Time `json:"observed_at"`
Nonce string `json:"nonce"`
}
type Operation ¶
type Operation struct {
CancelRequested bool `json:"cancel_requested"`
CancelState string `json:"cancel_state"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
ID string `json:"id"`
Environment string `json:"environment"`
RepositoryID string `json:"repository_id"`
GateID string `json:"gate_id"`
State string `json:"state"`
Reason string `json:"reason"`
Version int64 `json:"version"`
RequestedBy string `json:"requested_by"`
Native *forge.DeploymentStatus `json:"native,omitempty"`
RecoveryOf string `json:"recovery_of,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type PreviewRequest ¶
type PreviewRequest struct {
ChangeID string `json:"change_id"`
SourceSHA string `json:"source_sha"`
ArtifactDigest string `json:"artifact_digest"`
Provenance SignedProvenance `json:"provenance"`
RecoveryOf string `json:"recovery_of,omitempty"`
RestoreDeploymentID string `json:"restore_deployment_id,omitempty"`
}
type Provenance ¶
type Qualification ¶
type Qualification struct {
Provider string `json:"provider"`
ServerVersion string `json:"server_version"`
ConnectionVersion int64 `json:"connection_version"`
EvidenceReference string `json:"evidence_reference"`
EvidenceSHA256 string `json:"evidence_sha256"`
VerifiedAt time.Time `json:"verified_at"`
ExpiresAt time.Time `json:"expires_at"`
PinnedInputs bool `json:"pinned_inputs"`
NativeEnforcement bool `json:"native_enforcement"`
EnvironmentSerialization bool `json:"environment_serialization"`
NoBypass bool `json:"no_bypass"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Configurations ¶
func (*Service) PutConfiguration ¶
func (*Service) ReceiveHealth ¶
func (*Service) RegisterGateAuthority ¶
type SignedProvenance ¶
type SignedProvenance struct {
Document Provenance `json:"document"`
Signature string `json:"signature"`
}
type TrackRequest ¶
type TrackRequest struct {
PreviewRequest
RunID string `json:"run_id"`
IdempotencyKey string `json:"idempotency_key"`
}
Click to show internal directories.
Click to hide internal directories.