Documentation
¶
Index ¶
- type Store
- func (s *Store) AddComment(incidentID string, comment incident.Comment) error
- func (s *Store) FindActiveByKey(ctx context.Context, service, deployID string, since time.Time) (*incident.Incident, error)
- func (s *Store) Get(ctx context.Context, id string) (*incident.Incident, error)
- func (s *Store) GetComments(incidentID string) ([]incident.Comment, error)
- func (s *Store) List(ctx context.Context, filter incident.IncidentFilter) ([]incident.Incident, error)
- func (s *Store) Save(ctx context.Context, inc *incident.Incident) error
- func (s *Store) Update(ctx context.Context, inc *incident.Incident) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements incident.IncidentStore against PostgreSQL.
func (*Store) AddComment ¶
AddComment inserts a comment for the given incident.
func (*Store) FindActiveByKey ¶
func (s *Store) FindActiveByKey(ctx context.Context, service, deployID string, since time.Time) (*incident.Incident, error)
FindActiveByKey returns the most recent active or acknowledged incident matching the given service, optional deploy ID, and recency threshold.
func (*Store) Get ¶
Get returns the incident with the given ID. Returns incident.ErrNotFound if no row exists.
func (*Store) GetComments ¶
GetComments returns all comments for the given incident, ordered by creation time.
func (*Store) List ¶
func (s *Store) List(ctx context.Context, filter incident.IncidentFilter) ([]incident.Incident, error)
List returns incidents matching the given filter, ordered by first_seen DESC.
Click to show internal directories.
Click to hide internal directories.