Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWeatherRecordFromDB ¶
func GetWeatherRecordFromDB(ctx context.Context, db WeatherDB, location string) (models.WeatherRecord, error)
GetWeatherRecordFromDB retrieves weather data from the database
Types ¶
type MockWeatherDB ¶
type MockWeatherDB struct {
// contains filtered or unexported fields
}
MockWeatherDB is a mock implementation of the WeatherDB interface
func NewMockWeatherDB ¶
func NewMockWeatherDB() *MockWeatherDB
NewMockWeatherDB creates a new mock weather database
func (*MockWeatherDB) ListLocations ¶
func (db *MockWeatherDB) ListLocations(ctx context.Context) ([]string, error)
ListLocations returns a list of all available locations in the database
func (*MockWeatherDB) QueryWeather ¶
func (db *MockWeatherDB) QueryWeather(ctx context.Context, location string) (models.WeatherRecord, error)
QueryWeather retrieves weather data for a location from the mock database
Click to show internal directories.
Click to hide internal directories.