Documentation ¶
Index ¶
- type PGRepository
- func (repo *PGRepository) Delete(ctx context.Context, f *model.ObservationFilter) ([]*model.Observation, error)
- func (repo *PGRepository) Fetch(ctx context.Context, f *model.ObservationFilter) ([]*model.Observation, int, error)
- func (repo *PGRepository) FetchServers(ctx context.Context) ([]string, error)
- func (repo *PGRepository) Store(ctx context.Context, observation *model.Observation) error
- func (repo *PGRepository) StoreMany(ctx context.Context, observations []*model.Observation) error
- func (repo *PGRepository) Update(ctx context.Context, observation *model.Observation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PGRepository ¶ added in v1.1.0
type PGRepository struct {
*pg.DB
}
func NewPgRepository ¶ added in v1.1.0
func NewPgRepository(db *pg.DB) (*PGRepository, error)
func (*PGRepository) Delete ¶ added in v1.1.0
func (repo *PGRepository) Delete(ctx context.Context, f *model.ObservationFilter) ([]*model.Observation, error)
func (*PGRepository) Fetch ¶ added in v1.1.0
func (repo *PGRepository) Fetch(ctx context.Context, f *model.ObservationFilter) ([]*model.Observation, int, error)
func (*PGRepository) FetchServers ¶ added in v1.1.0
func (repo *PGRepository) FetchServers(ctx context.Context) ([]string, error)
func (*PGRepository) Store ¶ added in v1.1.0
func (repo *PGRepository) Store(ctx context.Context, observation *model.Observation) error
func (*PGRepository) StoreMany ¶ added in v1.1.0
func (repo *PGRepository) StoreMany(ctx context.Context, observations []*model.Observation) error
func (*PGRepository) Update ¶ added in v1.1.0
func (repo *PGRepository) Update(ctx context.Context, observation *model.Observation) error
Click to show internal directories.
Click to hide internal directories.