Documentation
¶
Index ¶
- Variables
- type CandidateTarget
- type CreateReceiptParams
- type DeletedReceipt
- type Evidence
- type EvidenceParams
- type FullRepository
- type LatestReceipt
- type LifecycleLink
- type LifecycleRepository
- type LinkDeploymentParams
- type MaintenanceOrganization
- type MaintenanceRepository
- type OperationalRepository
- type OperationalRun
- type Receipt
- type Repository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCandidateNotFound = xerror.NotFound(xerror.Pipeline).Detail("proof candidate not found") ErrReceiptNotFound = xerror.New(xerror.KindNotFound, "PROOF_RECEIPT_NOT_FOUND", "proof receipt not found") ErrLifecycleLinkNotFound = xerror.New(xerror.KindNotFound, "PROOF_LIFECYCLE_LINK_NOT_FOUND", "matching proof lifecycle link not found") )
Functions ¶
This section is empty.
Types ¶
type CandidateTarget ¶
type CandidateTarget struct {
OrganizationID int32
ProjectID int64
ProjectEnvironmentID int64
MappingID int64
CandidateID int64
SupersedesCandidateID *int64
CandidateSlug slug.Slug
OrganizationSlug slug.Slug
ProjectSlug slug.Slug
EnvironmentSlug slug.Slug
ProviderConnectionSlug slug.Slug
RepositoryID string
ChangeRequestID string
HeadSHA string
TargetRef string
PipelinePath string
SpecHash string
CanonicalSpec json.RawMessage
CreatedAt time.Time
}
type CreateReceiptParams ¶
type CreateReceiptParams struct {
EvidenceID int64
ReceiptKey string
Receipt model.ProofReceipt
Supersedes *LatestReceipt
}
type EvidenceParams ¶
type FullRepository ¶
type FullRepository interface {
Repository
LifecycleRepository
MaintenanceRepository
OperationalRepository
}
func New ¶
func New() FullRepository
type LatestReceipt ¶
type LifecycleLink ¶
type LifecycleLink struct {
Kind model.ProofLifecycleLinkKind
ReceiptSlug slug.Slug
Identifier string
SpecHash string
BindingFingerprint string
CapabilityFingerprint string
LinkedAt time.Time
RetainUntil time.Time
Superseded bool
PipelineSlug *slug.Slug
RunSlug *slug.Slug
CurrentSpecHash string
CurrentIdentifier string
}
type LifecycleRepository ¶
type LifecycleRepository interface {
FindBySlug(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug) (*Receipt, error)
LinkDeployment(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug, LinkDeploymentParams) (*LifecycleLink, error)
LinkRun(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug, int64, string, time.Time) (*LifecycleLink, error)
FindDeploymentLink(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug) (*LifecycleLink, error)
FindRunLink(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug) (*LifecycleLink, error)
}
type LinkDeploymentParams ¶
type MaintenanceOrganization ¶
type MaintenanceRepository ¶
type MaintenanceRepository interface {
LockTarget(context.Context, postgres.DBTX, string) error
ListMaintenanceOrganizations(context.Context, postgres.DBTX, int32) ([]MaintenanceOrganization, error)
DeleteExpired(context.Context, postgres.DBTX, slug.Slug) ([]DeletedReceipt, error)
DeleteUnusedEvidence(context.Context, postgres.DBTX, slug.Slug, []int64) error
}
type OperationalRepository ¶
type OperationalRun ¶
type Receipt ¶
type Receipt struct {
Value model.ProofReceipt
Superseded bool
}
type Repository ¶
type Repository interface {
LockSource(context.Context, postgres.DBTX, slug.Slug, slug.Slug) error
PublicationEnabled(context.Context, postgres.DBTX, slug.Slug, slug.Slug) (bool, error)
FindLatestForCandidate(context.Context, postgres.DBTX, slug.Slug, slug.Slug) (*Receipt, error)
FindCandidateTarget(context.Context, postgres.DBTX, slug.Slug, slug.Slug) (*CandidateTarget, error)
LockTarget(context.Context, postgres.DBTX, string) error
CreateEvidence(context.Context, postgres.DBTX, *CandidateTarget, EvidenceParams) (*Evidence, error)
FindLatest(context.Context, postgres.DBTX, *CandidateTarget, string) (*LatestReceipt, error)
Create(context.Context, postgres.DBTX, *CandidateTarget, CreateReceiptParams) (*Receipt, error)
FindBySlug(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug) (*Receipt, error)
List(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, model.ListRequest) ([]*Receipt, error)
ListLifecycleLinksByReceipt(context.Context, postgres.DBTX, slug.Slug, slug.Slug, slug.Slug, slug.Slug) ([]LifecycleLink, error)
}
Click to show internal directories.
Click to hide internal directories.