This repository has been archived on 2022-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
2020-06-18 12:51:31 +00:00
|
|
|
package observation
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-07-17 15:22:36 +00:00
|
|
|
"github.com/tribalwarshelp/dcbot/model"
|
2020-06-18 12:51:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Repository interface {
|
2021-07-17 15:22:36 +00:00
|
|
|
Store(ctx context.Context, observation *model.Observation) error
|
|
|
|
StoreMany(ctx context.Context, observations []*model.Observation) error
|
|
|
|
Update(ctx context.Context, observation *model.Observation) error
|
|
|
|
Delete(ctx context.Context, filter *model.ObservationFilter) ([]*model.Observation, error)
|
|
|
|
Fetch(ctx context.Context, filter *model.ObservationFilter) ([]*model.Observation, int, error)
|
2020-06-26 18:30:25 +00:00
|
|
|
FetchServers(ctx context.Context) ([]string, error)
|
2020-06-18 12:51:31 +00:00
|
|
|
}
|