Documentation
¶
Index ¶
- Constants
- Variables
- func AuditObservationAccessRejected(ctx context.Context, events eventssvc.Service, scope ObservationScope, ...) (retErr error)
- func AuditReceiptRead(ctx context.Context, events eventssvc.Service, scope ObservationScope, ...) (retErr error)
- type BindingResolver
- type Compiler
- func (s *Compiler) Compile(ctx context.Context, orgSlug, candidateSlug slug.Slug) (*proofreceipts.Receipt, error)
- func (s *Compiler) Get(ctx context.Context, ...) (*ReceiptDetail, error)
- func (s *Compiler) List(ctx context.Context, orgSlug, projectSlug, environmentSlug slug.Slug, ...) (model.ListResponse[*ReceiptDetail], error)
- type ContractValidator
- type DeploymentReader
- type EnvironmentSecretResolver
- type LifecycleLink
- type LiveCompiler
- func (s *LiveCompiler) AuthorizeObservation(ctx context.Context, scope ObservationScope, actor slug.Slug, ...) (out *ObservationJob, retErr error)
- func (s *LiveCompiler) CancelObservation(ctx context.Context, scope ObservationScope, actor, jobSlug slug.Slug) (out *ObservationJob, retErr error)
- func (s *LiveCompiler) Compile(ctx context.Context, org, candidate slug.Slug) (*proofreceipts.Receipt, error)
- func (s *LiveCompiler) CompileObserved(ctx context.Context, scope ObservationScope, actor, candidate slug.Slug, ...) (out *proofreceipts.Receipt, retErr error)
- func (s *LiveCompiler) Get(ctx context.Context, org, project, environment, receiptSlug slug.Slug) (*ReceiptDetail, error)
- func (s *LiveCompiler) GetObservation(ctx context.Context, scope ObservationScope, actor, job slug.Slug) (out *ObservationJob, retErr error)
- func (s *LiveCompiler) GetObservationPolicy(ctx context.Context, scope ObservationScope, actor slug.Slug) (out *ObservationPolicy, retErr error)
- func (s *LiveCompiler) List(ctx context.Context, org, project, environment slug.Slug, ...) (model.ListResponse[*ReceiptDetail], error)
- func (s *LiveCompiler) PrepareObservation(ctx context.Context, scope ObservationScope, ...) (out *ObservationPreview, retErr error)
- func (s *LiveCompiler) SetObservationPolicy(ctx context.Context, scope ObservationScope, actor slug.Slug, ...) (out *ObservationPolicy, retErr error)
- type ObservationJob
- type ObservationPolicy
- type ObservationPolicySettings
- type ObservationPreview
- type ObservationScope
- type OperationalCompiler
- func (s *OperationalCompiler) CompileOperational(ctx context.Context, scope ObservationScope, actor, sourceReceipt slug.Slug, ...) (out *proofreceipts.Receipt, retErr error)
- func (s *OperationalCompiler) Get(ctx context.Context, org, project, environment, receipt slug.Slug) (*ReceiptDetail, error)
- func (s *OperationalCompiler) List(ctx context.Context, org, project, environment slug.Slug, ...) (model.ListResponse[*ReceiptDetail], error)
- type OperationalObservation
- type OperationalSelection
- type OperationalService
- type PipelineValidator
- type ReceiptDetail
- type ReceiptPublicationProducer
- type SchemaReader
- type Service
Constants ¶
const ( LiveCompilerVersion = "proof-live-metadata-compiler-v2" LivePolicyVersion = "proof-live-metadata-policy-v2" )
const ( CompilerVersion = "proof-preview-compiler-v3" PolicyVersion = "proof-preview-policy-v1" )
const OperationalPolicyVersion = "proof-operational-structural-policy-v1"
Variables ¶
Functions ¶
func AuditObservationAccessRejected ¶
func AuditObservationAccessRejected(ctx context.Context, events eventssvc.Service, scope ObservationScope, actor model.EventActor, action model.Action, resource model.Resource) (retErr error)
AuditObservationAccessRejected records the HTTP authorization boundary without constructing the admitted compiler or reading an observation target. The caller keeps its original denial response regardless of audit persistence outcome.
func AuditReceiptRead ¶
func AuditReceiptRead(ctx context.Context, events eventssvc.Service, scope ObservationScope, actor model.EventActor, receipt slug.Slug) (retErr error)
AuditReceiptRead runs before the HTTP response exposes the protected receipt.
Types ¶
type BindingResolver ¶
type BindingResolver interface {
ResolvePipelineDataSourceRefs(context.Context, slug.Slug, slug.Slug, slug.Slug, *pipelinespec.Pipeline) (*datasourcerefssvc.ResolvedPipeline, error)
}
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func New ¶
func New( txm postgres.TransactionManager, repo proofreceipts.Repository, validator PipelineValidator, bindings BindingResolver, schemas SchemaReader, deployments DeploymentReader, secrets EnvironmentSecretResolver, contracts ContractValidator, clk clock.Clock, ) (*Compiler, error)
func (*Compiler) List ¶
func (s *Compiler) List(ctx context.Context, orgSlug, projectSlug, environmentSlug slug.Slug, req model.ListRequest) (model.ListResponse[*ReceiptDetail], error)
type ContractValidator ¶
type DeploymentReader ¶
type LifecycleLink ¶
type LiveCompiler ¶
type LiveCompiler struct {
// contains filtered or unexported fields
}
LiveCompiler is a separately admitted path. The ordinary compiler never dispatches observations or silently upgrades cached evidence.
func NewLiveCompiler ¶
func NewLiveCompiler(base *Compiler, ledger *proofevidencesvc.Ledger, sources datasources.Repository, operations queries.Repository, coordinator *proofevidencesvc.Coordinator, events eventrecorder.Recorder, publication ReceiptPublicationProducer, gitChecksEnabled bool) (*LiveCompiler, error)
func (*LiveCompiler) AuthorizeObservation ¶
func (s *LiveCompiler) AuthorizeObservation(ctx context.Context, scope ObservationScope, actor slug.Slug, token, digest string) (out *ObservationJob, retErr error)
func (*LiveCompiler) CancelObservation ¶
func (s *LiveCompiler) CancelObservation(ctx context.Context, scope ObservationScope, actor, jobSlug slug.Slug) (out *ObservationJob, retErr error)
func (*LiveCompiler) Compile ¶
func (s *LiveCompiler) Compile(ctx context.Context, org, candidate slug.Slug) (*proofreceipts.Receipt, error)
Compile preserves admitted live receipts for provider re-requests. Live dispatch and receipt upgrades require explicit authorization and CompileObserved.
func (*LiveCompiler) CompileObserved ¶
func (s *LiveCompiler) CompileObserved(ctx context.Context, scope ObservationScope, actor, candidate slug.Slug, jobs []slug.Slug) (out *proofreceipts.Receipt, retErr error)
func (*LiveCompiler) Get ¶
func (s *LiveCompiler) Get(ctx context.Context, org, project, environment, receiptSlug slug.Slug) (*ReceiptDetail, error)
func (*LiveCompiler) GetObservation ¶
func (s *LiveCompiler) GetObservation(ctx context.Context, scope ObservationScope, actor, job slug.Slug) (out *ObservationJob, retErr error)
func (*LiveCompiler) GetObservationPolicy ¶
func (s *LiveCompiler) GetObservationPolicy(ctx context.Context, scope ObservationScope, actor slug.Slug) (out *ObservationPolicy, retErr error)
func (*LiveCompiler) List ¶
func (s *LiveCompiler) List(ctx context.Context, org, project, environment slug.Slug, req model.ListRequest) (model.ListResponse[*ReceiptDetail], error)
func (*LiveCompiler) PrepareObservation ¶
func (s *LiveCompiler) PrepareObservation(ctx context.Context, scope ObservationScope, actor, candidateSlug, stepSlug slug.Slug, target proofevidence.MetadataPlan) (out *ObservationPreview, retErr error)
PrepareObservation resolves a reviewable intent without reserving a job, decrypting a credential, or contacting a provider. HTTP owns user permissions.
func (*LiveCompiler) SetObservationPolicy ¶
func (s *LiveCompiler) SetObservationPolicy(ctx context.Context, scope ObservationScope, actor slug.Slug, settings ObservationPolicySettings) (out *ObservationPolicy, retErr error)
type ObservationJob ¶
type ObservationJob struct {
Slug slug.Slug
State string
RequestDigest string
Deadline time.Time
CancellationRequested bool
Outcome *proofevidence.Outcome
}
ObservationJob exposes only the public status of retained evidence.
type ObservationPolicy ¶
type ObservationPolicy struct {
Version string
Settings ObservationPolicySettings
}
type ObservationPolicySettings ¶
type ObservationPolicySettings struct {
Enabled bool
TimeoutSeconds, EvidenceTTLSeconds int
MaxRequests, MaxRows, MaxBytes int64
}
ObservationPolicySettings are per-connector cumulative bounds in a rolling hour. Fixed metadata routes, zero retries/cost, and one concurrent job are not editable.
type ObservationPreview ¶
type ObservationPreview struct {
IntentToken string `json:"-"`
RequestDigest string
Request proofevidence.Request `json:"-"`
Target proofevidence.MetadataPlan `json:"-"`
ExpiresAt time.Time
}
type ObservationScope ¶
type ObservationScope = proofobservations.Scope
ObservationScope selects a tenant's project environment without a persistence capability.
type OperationalCompiler ¶
type OperationalCompiler struct {
Service
// contains filtered or unexported fields
}
OperationalCompiler admits structural checks and preserves historical receipts.
func NewOperationalCompiler ¶
func NewOperationalCompiler(service Service, base *Compiler, runs proofreceipts.OperationalRepository, events eventrecorder.Recorder) (*OperationalCompiler, error)
func (*OperationalCompiler) CompileOperational ¶
func (s *OperationalCompiler) CompileOperational(ctx context.Context, scope ObservationScope, actor, sourceReceipt slug.Slug, selection OperationalSelection) (out *proofreceipts.Receipt, retErr error)
func (*OperationalCompiler) Get ¶
func (s *OperationalCompiler) Get(ctx context.Context, org, project, environment, receipt slug.Slug) (*ReceiptDetail, error)
func (*OperationalCompiler) List ¶
func (s *OperationalCompiler) List(ctx context.Context, org, project, environment slug.Slug, req model.ListRequest) (model.ListResponse[*ReceiptDetail], error)
type OperationalObservation ¶
type OperationalObservation struct {
Selection OperationalSelection `json:"selection"`
Status pipelinerun.CheckStatus `json:"status"`
ReasonCode string `json:"reason_code"`
ExpiresAt time.Time `json:"expires_at"`
Evidence *pipelinerun.CheckEvidence `json:"evidence"`
ReusedFromRun string `json:"reused_from_run"`
}
OperationalObservation contains only retained, safe check aggregates. The caller must load it through tenant-scoped storage, never from request data.
type OperationalSelection ¶
type OperationalSelection = model.ProofOperationalSelection
type OperationalService ¶
type OperationalService interface {
Service
CompileOperational(context.Context, ObservationScope, slug.Slug, slug.Slug, OperationalSelection) (*proofreceipts.Receipt, error)
}
type PipelineValidator ¶
type PipelineValidator interface {
Validate(context.Context, slug.Slug, slug.Slug, slug.Slug, slug.Slug, *pipelinespec.Pipeline) (*pipelinesvc.PipelineValidationResult, error)
}
type ReceiptDetail ¶
type ReceiptDetail struct {
OperationalAdmissionEnabled *bool
OperationalEvidenceStatus model.ProofOperationalEvidenceStatus
OperationalCurrentVerdict model.ProofVerdict
Receipt model.ProofReceipt
LifecycleLinks []LifecycleLink
}
type SchemaReader ¶
type Service ¶
type Service interface {
Compile(context.Context, slug.Slug, slug.Slug) (*proofreceipts.Receipt, error)
Get(context.Context, slug.Slug, slug.Slug, slug.Slug, slug.Slug) (*ReceiptDetail, error)
List(context.Context, slug.Slug, slug.Slug, slug.Slug, model.ListRequest) (model.ListResponse[*ReceiptDetail], error)
}