Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCandidateNotFound = xerror.New( xerror.KindNotFound, "PROOF_CANDIDATE_NOT_FOUND", "proof candidate not found", )
View Source
var ErrMappingTargetNotFound = xerror.New( xerror.KindNotFound, "PROOF_MAPPING_TARGET_NOT_FOUND", "proof candidate mapping target not found", )
View Source
var ErrWebhookDeliveryDigestMismatch = xerror.New(xerror.KindInvalidInput, "PROOF_WEBHOOK_DELIVERY_DIGEST_MISMATCH", "proof webhook delivery identity was reused with different bytes")
Functions ¶
This section is empty.
Types ¶
type CreateCandidateParams ¶
type CreateMappingParams ¶
type DeliveryClaimer ¶
type DeliveryClaimer interface {
ClaimWebhookDelivery(context.Context, postgres.DBTX, string, string, string) (bool, error)
}
func NewDeliveryClaimer ¶
func NewDeliveryClaimer() DeliveryClaimer
type MappingLookup ¶
type Repository ¶
type Repository interface {
LockSource(context.Context, postgres.DBTX, slug.Slug, slug.Slug) error
CreateMapping(context.Context, postgres.DBTX, CreateMappingParams) (int64, error)
ResolveMappings(context.Context, postgres.DBTX, MappingLookup) ([]Mapping, error)
ResolveWebhookMappings(context.Context, postgres.DBTX, WebhookMappingLookup) ([]Mapping, error)
FindByKey(context.Context, postgres.DBTX, slug.Slug, string) (*Candidate, error)
FindByID(context.Context, postgres.DBTX, slug.Slug, int64) (*Candidate, error)
FindLatest(context.Context, postgres.DBTX, slug.Slug, int64, string) (*Candidate, error)
CloseLatest(context.Context, postgres.DBTX, slug.Slug, int64, string, string) (*Candidate, error)
ReopenByKey(context.Context, postgres.DBTX, slug.Slug, string) (*Candidate, error)
Create(context.Context, postgres.DBTX, slug.Slug, CreateCandidateParams) (*Candidate, error)
}
func New ¶
func New() Repository
Click to show internal directories.
Click to hide internal directories.