Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMappingNotFound = xerror.New(xerror.KindNotFound, "PROOF_CANDIDATE_MAPPING_NOT_FOUND", "proof candidate mapping not found") ErrMappingAmbiguous = xerror.New(xerror.KindInvalidInput, "PROOF_CANDIDATE_MAPPING_AMBIGUOUS", "proof candidate mapping is ambiguous") ErrSourceTooLarge = xerror.New(xerror.KindInvalidInput, "PROOF_CANDIDATE_SOURCE_TOO_LARGE", "proof candidate source is too large") ErrParseFailed = xerror.New(xerror.KindInvalidInput, "PROOF_CANDIDATE_PARSE_FAILED", "proof candidate parse failed") )
Functions ¶
This section is empty.
Types ¶
type GitAuthResolver ¶
type GitAuthResolver interface {
ResolveGitAuth(context.Context, slug.Slug, slug.Slug) (*datasourcessvc.GitDataSourceAuth, error)
}
type Service ¶
type Service interface {
IngestTarget(context.Context, proofrepo.Mapping, model.EventActor, gitprovider.VerifiedChange) (*Result, error)
CloseTarget(context.Context, proofrepo.Mapping, model.EventActor, gitprovider.VerifiedChange) error
Ingest(context.Context, slug.Slug, model.EventActor, gitprovider.VerifiedChange) (*Result, error)
Close(context.Context, slug.Slug, model.EventActor, gitprovider.VerifiedChange) error
}
func New ¶
func New(txm postgres.TransactionManager, repo proofrepo.Repository, sources SourceVerifier, events workerproducer.EventProducer) (Service, error)
type SourceVerifier ¶
type SourceVerifier interface {
VerifySource(context.Context, proofrepo.Mapping, gitprovider.VerifiedChange) ([]byte, error)
}
SourceVerifier reads pipeline bytes from the exact provider head after re-checking change state, repository, refs, and head SHA.
func NewExactSourceVerifier ¶
func NewExactSourceVerifier(auth GitAuthResolver) (SourceVerifier, error)
NewExactSourceVerifier keeps source verification provider-backed so local repository state cannot substitute for the provider's current change head.
Click to show internal directories.
Click to hide internal directories.