Documentation
¶
Index ¶
- Variables
- type Episode
- type EpisodeEvidence
- type Expectation
- type Repository
- func (*Repository) ActiveEpisodes(ctx context.Context, tx postgres.DBTX, e Expectation) ([]Episode, error)
- func (*Repository) CreateEpisode(ctx context.Context, tx postgres.DBTX, e Expectation, record slug.Slug, ...) error
- func (*Repository) CreateExpectation(ctx context.Context, tx postgres.DBTX, e Expectation) (*Expectation, error)
- func (*Repository) FindCurrent(ctx context.Context, tx postgres.DBTX, scope Scope) (Expectation, error)
- func (*Repository) FindLatest(ctx context.Context, tx postgres.DBTX, scope Scope) (*Expectation, error)
- func (*Repository) Inspect(ctx context.Context, db postgres.DBTX, scope Scope) (Expectation, error)
- func (*Repository) InspectEpisodes(ctx context.Context, db postgres.DBTX, scope Scope) ([]EpisodeEvidence, error)
- func (*Repository) ListForSystem(ctx context.Context, tx postgres.DBTX) ([]Expectation, error)
- func (*Repository) LockScope(ctx context.Context, tx postgres.DBTX, scope Scope) error
- func (*Repository) RecordSuccess(ctx context.Context, tx postgres.DBTX, ...) error
- func (*Repository) ResolveEpisode(ctx context.Context, tx postgres.DBTX, e Expectation, episode Episode, ...) error
- type Scope
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpectationNotFound = xerror.NotFound(xerror.Pipeline).Detail("run recency expectation not found")
Functions ¶
This section is empty.
Types ¶
type EpisodeEvidence ¶
type EpisodeEvidence struct {
Episode
ExpectationRevision int64
MaximumAge time.Duration
EnabledAt time.Time
VersionSpecHash string
ResolutionDigest *string
DeployedAt time.Time
ResolvedAt *time.Time
ResolutionReason, RecoveryRun *string
RecoverySucceededAt *time.Time
}
EpisodeEvidence retains the identities recorded when a breach was observed.
type Expectation ¶
type Expectation struct {
ScopeDisabled bool
ID int64
Scope
EnvironmentID int64
Revision int64
MaximumAge time.Duration
Enabled bool
EnabledAt time.Time
DeploymentID, DeploymentRevision, VersionID int64
ResolutionDigest *string
VersionSpecHash *string
DeployedAt time.Time
SuccessRun *string
SucceededAt *time.Time
}
type Repository ¶
type Repository struct{}
func New ¶
func New() *Repository
func (*Repository) ActiveEpisodes ¶
func (*Repository) ActiveEpisodes(ctx context.Context, tx postgres.DBTX, e Expectation) ([]Episode, error)
func (*Repository) CreateEpisode ¶
func (*Repository) CreateExpectation ¶
func (*Repository) CreateExpectation(ctx context.Context, tx postgres.DBTX, e Expectation) (*Expectation, error)
func (*Repository) FindCurrent ¶
func (*Repository) FindCurrent(ctx context.Context, tx postgres.DBTX, scope Scope) (Expectation, error)
func (*Repository) FindLatest ¶
func (*Repository) FindLatest(ctx context.Context, tx postgres.DBTX, scope Scope) (*Expectation, error)
func (*Repository) Inspect ¶
func (*Repository) Inspect(ctx context.Context, db postgres.DBTX, scope Scope) (Expectation, error)
func (*Repository) InspectEpisodes ¶
func (*Repository) InspectEpisodes(ctx context.Context, db postgres.DBTX, scope Scope) ([]EpisodeEvidence, error)
func (*Repository) ListForSystem ¶
func (*Repository) ListForSystem(ctx context.Context, tx postgres.DBTX) ([]Expectation, error)
func (*Repository) RecordSuccess ¶
func (*Repository) ResolveEpisode ¶
Click to show internal directories.
Click to hide internal directories.