Documentation ¶
Index ¶
- func GetDb() (db *sqlx.DB, err error)
- type ForecastRepo
- func (f *ForecastRepo) Close() error
- func (r *ForecastRepo) GetAlerts(ctx context.Context, fromDate time.Time) ([]model.ForecastModel, error)
- func (r *ForecastRepo) GetForecast(ctx context.Context, fromDate time.Time) ([]model.ForecastModel, error)
- func (r *ForecastRepo) GetLastUpdate(ctx context.Context) (time.Time, error)
- func (r *ForecastRepo) SaveForecast(ctx context.Context, forecasts []model.ForecastModel) error
- type SQLConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ForecastRepo ¶
type ForecastRepo struct {
// contains filtered or unexported fields
}
ForecastRepo is the forecast repository
func GetPostgresRepo ¶
func GetPostgresRepo() (*ForecastRepo, error)
func NewForecastRepo ¶
func NewForecastRepo(db *sqlx.DB) *ForecastRepo
NewForecastRepo creates a new forecast repository
func (*ForecastRepo) Close ¶
func (f *ForecastRepo) Close() error
func (*ForecastRepo) GetAlerts ¶
func (r *ForecastRepo) GetAlerts(ctx context.Context, fromDate time.Time) ([]model.ForecastModel, error)
func (*ForecastRepo) GetForecast ¶
func (r *ForecastRepo) GetForecast(ctx context.Context, fromDate time.Time) ([]model.ForecastModel, error)
func (*ForecastRepo) GetLastUpdate ¶
func (*ForecastRepo) SaveForecast ¶
func (r *ForecastRepo) SaveForecast(ctx context.Context, forecasts []model.ForecastModel) error
Click to show internal directories.
Click to hide internal directories.