Documentation ¶
Index ¶
- type Accessor
- type CaseDAL
- func (s *CaseDAL) Client() *Client
- func (s *CaseDAL) Collection() *mongo.Collection
- func (s *CaseDAL) Get(dep string, date time.Time) (*covidtracker.Case, error)
- func (s *CaseDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Case, error)
- func (s *CaseDAL) Upsert(cases ...*covidtracker.Case) error
- type Client
- func (c *Client) Case() covidtracker.CaseDAL
- func (c *Client) Close() error
- func (c *Client) Emergency() covidtracker.EmergencyDAL
- func (c *Client) Hospitalization() covidtracker.HospDAL
- func (c *Client) Hotel() covidtracker.HotelDAL
- func (c *Client) Indicator() covidtracker.IndicDAL
- func (c *Client) Open() error
- func (c *Client) Risk() covidtracker.RiskDAL
- func (c *Client) RiskParameters() covidtracker.RiskParametersDAL
- func (c *Client) Screening() covidtracker.ScreeningDAL
- type EmergencyDAL
- func (s *EmergencyDAL) Client() *Client
- func (s *EmergencyDAL) Collection() *mongo.Collection
- func (s *EmergencyDAL) Get(dep string, date time.Time) (*covidtracker.Emergency, error)
- func (s *EmergencyDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Emergency, error)
- func (s *EmergencyDAL) Upsert(ems ...*covidtracker.Emergency) error
- type HospDAL
- func (s *HospDAL) Client() *Client
- func (s *HospDAL) Collection() *mongo.Collection
- func (s *HospDAL) Get(dep string, date time.Time) (*covidtracker.Hospitalization, error)
- func (s *HospDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Hospitalization, error)
- func (s *HospDAL) Upsert(hosps ...*covidtracker.Hospitalization) error
- type HotelDAL
- type IndicDAL
- func (s *IndicDAL) Client() *Client
- func (s *IndicDAL) Collection() *mongo.Collection
- func (s *IndicDAL) Get(dep string, date time.Time) (*covidtracker.Indicator, error)
- func (s *IndicDAL) GetRange(dep int, start, end time.Time) ([]*covidtracker.Indicator, error)
- func (s *IndicDAL) Upsert(inds ...*covidtracker.Indicator) error
- type RiskDAL
- type RiskParametersDAL
- type ScreeningDAL
- func (s *ScreeningDAL) Client() *Client
- func (s *ScreeningDAL) Collection() *mongo.Collection
- func (s *ScreeningDAL) Get(dep string, date time.Time) (*covidtracker.Screening, error)
- func (s *ScreeningDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Screening, error)
- func (s *ScreeningDAL) Upsert(scrs ...*covidtracker.Screening) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessor ¶
type Accessor interface { Client() *Client Collection() *mongo.Collection }
type CaseDAL ¶
type CaseDAL struct {
// contains filtered or unexported fields
}
CaseDAL represents a service for managing suppliers.
func (*CaseDAL) Collection ¶
func (s *CaseDAL) Collection() *mongo.Collection
type Client ¶
type Client struct { MongoURI string // Returns the current time. Now func() time.Time Ctx context.Context // contains filtered or unexported fields }
Client encapsulates the mongo client
func (*Client) Case ¶
func (c *Client) Case() covidtracker.CaseDAL
Case returns the dal for hospital service with at least one declared case
func (*Client) Emergency ¶
func (c *Client) Emergency() covidtracker.EmergencyDAL
Emergency returns the dal for emergency data
func (*Client) Hospitalization ¶
func (c *Client) Hospitalization() covidtracker.HospDAL
Hospitalization returns the dal for hospitalization data
func (*Client) Hotel ¶
func (c *Client) Hotel() covidtracker.HotelDAL
Hotel returns the dal for hotel
func (*Client) Indicator ¶
func (c *Client) Indicator() covidtracker.IndicDAL
Indicator returns the dal for indicator data
func (*Client) RiskParameters ¶
func (c *Client) RiskParameters() covidtracker.RiskParametersDAL
Parameters returns the dal for parameters
func (*Client) Screening ¶
func (c *Client) Screening() covidtracker.ScreeningDAL
Screening returns the dal for screening data
type EmergencyDAL ¶
type EmergencyDAL struct {
// contains filtered or unexported fields
}
EmergencyDAL represents a service for managing suppliers.
func (*EmergencyDAL) Client ¶
func (s *EmergencyDAL) Client() *Client
func (*EmergencyDAL) Collection ¶
func (s *EmergencyDAL) Collection() *mongo.Collection
func (*EmergencyDAL) Get ¶
func (s *EmergencyDAL) Get(dep string, date time.Time) (*covidtracker.Emergency, error)
func (*EmergencyDAL) GetRange ¶
func (s *EmergencyDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Emergency, error)
func (*EmergencyDAL) Upsert ¶
func (s *EmergencyDAL) Upsert(ems ...*covidtracker.Emergency) error
type HospDAL ¶
type HospDAL struct {
// contains filtered or unexported fields
}
HospDAL represents a service for managing suppliers.
func (*HospDAL) Collection ¶
func (s *HospDAL) Collection() *mongo.Collection
func (*HospDAL) Get ¶
func (s *HospDAL) Get(dep string, date time.Time) (*covidtracker.Hospitalization, error)
func (*HospDAL) GetRange ¶
func (s *HospDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Hospitalization, error)
func (*HospDAL) Upsert ¶
func (s *HospDAL) Upsert(hosps ...*covidtracker.Hospitalization) error
type HotelDAL ¶
type HotelDAL struct {
// contains filtered or unexported fields
}
func (*HotelDAL) Collection ¶
func (s *HotelDAL) Collection() *mongo.Collection
func (*HotelDAL) Get ¶
func (s *HotelDAL) Get(id covidtracker.HotelID) (*covidtracker.Hotel, error)
Get returns a hotel by ID.
func (*HotelDAL) Insert ¶
func (s *HotelDAL) Insert(hotels []*covidtracker.Hotel) ([]*covidtracker.Hotel, error)
Insert CdsApi result
type IndicDAL ¶
type IndicDAL struct {
// contains filtered or unexported fields
}
IndicDAL represents a service for managing suppliers.
func (*IndicDAL) Collection ¶
func (s *IndicDAL) Collection() *mongo.Collection
type RiskDAL ¶
type RiskDAL struct {
// contains filtered or unexported fields
}
RiskService represents a service for managing suppliers.
func (*RiskDAL) Collection ¶
func (s *RiskDAL) Collection() *mongo.Collection
func (*RiskDAL) Get ¶
func (s *RiskDAL) Get(id covidtracker.RiskID) (*covidtracker.Risk, error)
Get returns a risk by ID.
type RiskParametersDAL ¶
type RiskParametersDAL struct {
// contains filtered or unexported fields
}
func (*RiskParametersDAL) Client ¶
func (s *RiskParametersDAL) Client() *Client
func (*RiskParametersDAL) Collection ¶
func (s *RiskParametersDAL) Collection() *mongo.Collection
func (*RiskParametersDAL) GetDefault ¶
func (s *RiskParametersDAL) GetDefault() (*covidtracker.RiskParameters, error)
GetDefault returns the default parameters from db
func (*RiskParametersDAL) Insert ¶
func (s *RiskParametersDAL) Insert(params *covidtracker.RiskParameters) error
Insert creates new parameters.
type ScreeningDAL ¶
type ScreeningDAL struct {
// contains filtered or unexported fields
}
ScreeningDAL represents a service for managing suppliers.
func (*ScreeningDAL) Client ¶
func (s *ScreeningDAL) Client() *Client
func (*ScreeningDAL) Collection ¶
func (s *ScreeningDAL) Collection() *mongo.Collection
func (*ScreeningDAL) Get ¶
func (s *ScreeningDAL) Get(dep string, date time.Time) (*covidtracker.Screening, error)
func (*ScreeningDAL) GetRange ¶
func (s *ScreeningDAL) GetRange(dep string, start, end time.Time) ([]*covidtracker.Screening, error)
func (*ScreeningDAL) Upsert ¶
func (s *ScreeningDAL) Upsert(scrs ...*covidtracker.Screening) error