Documentation
¶
Overview ¶
Package fake provides a fake weather client for testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*Config
}
Client ...
func NewClient ¶
NewClient creates a new client that will return fake data based on configuration. This is intended for testing purposes only and should be used in a staging environment or integration tests, not as a mock in unit tests
func (*Client) GetAverageHighTemperature ¶
GetAverageHighTemperature returns the configured value
type Config ¶
type Config struct {
RainMM float32 `mapstructure:"rain_mm"`
RainInterval string `mapstructure:"rain_interval"`
AverageHighTemperature float32 `mapstructure:"avg_high_temperature"`
Error string `mapstructure:"error"`
// contains filtered or unexported fields
}
Config is specific to the Fake API and holds all of the necessary fields for configuring fake data responses.
Click to show internal directories.
Click to hide internal directories.