Documentation
¶
Overview ¶
Package postgres implements store.Store on PostgreSQL via pgx (PRD §2).
Index ¶
- func MigrateDown(dsn string) error
- func MigrateUp(dsn string) error
- type Store
- func (s *Store) BaselineVersion(ctx context.Context) (model.ContractVersion, error)
- func (s *Store) Close()
- func (s *Store) DSN() string
- func (s *Store) GetContractVersion(ctx context.Context, id string) (model.ContractVersion, error)
- func (s *Store) LatestVersion(ctx context.Context) (model.ContractVersion, error)
- func (s *Store) ListChangeEvents(ctx context.Context, since time.Time) ([]model.ChangeEvent, error)
- func (s *Store) ProbeHistory(ctx context.Context, consumerID string, limit int) ([]model.ProbeResult, error)
- func (s *Store) SaveChangeEvents(ctx context.Context, events []model.ChangeEvent) error
- func (s *Store) SaveContractVersion(ctx context.Context, v model.ContractVersion) error
- func (s *Store) SaveProbeResults(ctx context.Context, results []model.ProbeResult) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateDown ¶
MigrateDown rolls back the most recent migration.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the PostgreSQL-backed implementation of store.Store.
func (*Store) BaselineVersion ¶
func (*Store) GetContractVersion ¶
func (*Store) LatestVersion ¶
func (*Store) ListChangeEvents ¶
func (*Store) ProbeHistory ¶
func (*Store) SaveChangeEvents ¶
func (*Store) SaveContractVersion ¶
func (*Store) SaveProbeResults ¶
Click to show internal directories.
Click to hide internal directories.