Documentation
¶
Index ¶
- type Client
- func (c *Client) GetWaterSchedulesUsingWeatherClient(id string) ([]*pkg.WaterSchedule, error)
- func (c *Client) GetWeatherClient(id xid.ID) (weather.Client, error)
- func (c *Client) GetZonesUsingWaterSchedule(id string) ([]*pkg.ZoneAndGarden, error)
- func (c *Client) RunGardenAndZoneMigrations(ctx context.Context) error
- func (c *Client) RunMigrations(ctx context.Context) error
- func (c *Client) RunWaterScheduleMigrations(ctx context.Context) error
- func (c *Client) RunZoneMigrations(ctx context.Context, g *pkg.Garden) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Gardens babyapi.Storage[*pkg.Garden]
Zones babyapi.Storage[*pkg.Zone]
WaterSchedules babyapi.Storage[*pkg.WaterSchedule]
WeatherClientConfigs babyapi.Storage[*weather.Config]
NotificationClientConfigs babyapi.Storage[*notifications.Client]
WaterRoutines babyapi.Storage[*pkg.WaterRoutine]
}
func (*Client) GetWaterSchedulesUsingWeatherClient ¶
func (c *Client) GetWaterSchedulesUsingWeatherClient(id string) ([]*pkg.WaterSchedule, error)
GetWaterSchedulesUsingWeatherClient will return all WaterSchedules that rely on this WeatherClient
func (*Client) GetWeatherClient ¶
GetWeatherClient ...
func (*Client) GetZonesUsingWaterSchedule ¶
func (c *Client) GetZonesUsingWaterSchedule(id string) ([]*pkg.ZoneAndGarden, error)
GetZonesUsingWaterSchedule will find all Zones that use this WaterSchedule and return the Zones along with the Gardens they belong to
func (*Client) RunGardenAndZoneMigrations ¶
func (*Client) RunWaterScheduleMigrations ¶
Click to show internal directories.
Click to hide internal directories.