Documentation ¶
Index ¶
- Constants
- func ActivateDeactivateServer(ch cqs.CommandHandler) http.HandlerFunc
- func AuthMiddleware(authToken string) func(next http.HandlerFunc) http.HandlerFunc
- func CreatePrograms(ch cqs.CommandHandler) http.HandlerFunc
- func CreateZone(ch cqs.CommandHandler) http.HandlerFunc
- func ExecuteZone(ch cqs.CommandHandler) http.HandlerFunc
- func FindAllPrograms(qh cqs.QueryHandler) http.HandlerFunc
- func FindExecutionLogs(qh cqs.QueryHandler) http.HandlerFunc
- func FindStatus(qh cqs.QueryHandler) http.HandlerFunc
- func FindWeather(qh cqs.QueryHandler) http.HandlerFunc
- func Homepage() http.HandlerFunc
- func RemoveZone(ch cqs.CommandHandler) http.HandlerFunc
- type CreateProgramsRequestJson
- type CreateZoneRequestJson
- type ExecuteZoneRequestJson
- type ExecutionItemRequest
- type ExecutionItemResponse
- type ExecutionLogItemResponse
- type ExecutionLogsResponseJson
- type ProgramItemRequest
- type ProgramItemResponse
- type ProgramsResponseJson
- type StatusResponseJson
- type TemperatureItemRequest
- type TemperatureItemResponse
- type WeatherResponseJson
- type WeeklyItemRequest
- type WeeklyItemResponse
Constants ¶
const ( ActivateAction = "activate" DeactivateAction = "deactivate" )
const AuthorizationHeader = "Authorization"
Variables ¶
This section is empty.
Functions ¶
func ActivateDeactivateServer ¶
func ActivateDeactivateServer(ch cqs.CommandHandler) http.HandlerFunc
func AuthMiddleware ¶
func AuthMiddleware(authToken string) func(next http.HandlerFunc) http.HandlerFunc
func CreatePrograms ¶
func CreatePrograms(ch cqs.CommandHandler) http.HandlerFunc
func CreateZone ¶
func CreateZone(ch cqs.CommandHandler) http.HandlerFunc
func ExecuteZone ¶
func ExecuteZone(ch cqs.CommandHandler) http.HandlerFunc
func FindAllPrograms ¶
func FindAllPrograms(qh cqs.QueryHandler) http.HandlerFunc
func FindExecutionLogs ¶
func FindExecutionLogs(qh cqs.QueryHandler) http.HandlerFunc
func FindStatus ¶
func FindStatus(qh cqs.QueryHandler) http.HandlerFunc
func FindWeather ¶
func FindWeather(qh cqs.QueryHandler) http.HandlerFunc
func Homepage ¶
func Homepage() http.HandlerFunc
func RemoveZone ¶
func RemoveZone(ch cqs.CommandHandler) http.HandlerFunc
Types ¶
type CreateProgramsRequestJson ¶
type CreateProgramsRequestJson struct { // Daily corresponds to the JSON schema field "daily". Daily []ProgramItemRequest `json:"daily,omitempty" yaml:"daily,omitempty" mapstructure:"daily,omitempty"` // Even corresponds to the JSON schema field "even". Even []ProgramItemRequest `json:"even,omitempty" yaml:"even,omitempty" mapstructure:"even,omitempty"` // Odd corresponds to the JSON schema field "odd". Odd []ProgramItemRequest `json:"odd,omitempty" yaml:"odd,omitempty" mapstructure:"odd,omitempty"` // Temperature corresponds to the JSON schema field "temperature". Temperature []TemperatureItemRequest `json:"temperature,omitempty" yaml:"temperature,omitempty" mapstructure:"temperature,omitempty"` // Weekly corresponds to the JSON schema field "weekly". Weekly []WeeklyItemRequest `json:"weekly,omitempty" yaml:"weekly,omitempty" mapstructure:"weekly,omitempty"` }
This schema defines the creation programs request
type CreateZoneRequestJson ¶
type CreateZoneRequestJson struct { // Id corresponds to the JSON schema field "id". Id string `json:"id" yaml:"id" mapstructure:"id"` // Name corresponds to the JSON schema field "name". Name string `json:"name" yaml:"name" mapstructure:"name"` // Relays corresponds to the JSON schema field "relays". Relays []int `json:"relays" yaml:"relays" mapstructure:"relays"` }
This schema defines the request to create a zone
func (*CreateZoneRequestJson) UnmarshalJSON ¶
func (j *CreateZoneRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ExecuteZoneRequestJson ¶
type ExecuteZoneRequestJson struct { // Seconds corresponds to the JSON schema field "seconds". Seconds int `json:"seconds" yaml:"seconds" mapstructure:"seconds"` }
This schema defines the request to execute a zone
func (*ExecuteZoneRequestJson) UnmarshalJSON ¶
func (j *ExecuteZoneRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ExecutionItemRequest ¶
type ExecutionItemRequest struct { // Seconds corresponds to the JSON schema field "seconds". Seconds int `json:"seconds" yaml:"seconds" mapstructure:"seconds"` // Zones corresponds to the JSON schema field "zones". Zones []string `json:"zones" yaml:"zones" mapstructure:"zones"` }
func (*ExecutionItemRequest) UnmarshalJSON ¶
func (j *ExecutionItemRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ExecutionItemResponse ¶
type ExecutionItemResponse struct { // Seconds corresponds to the JSON schema field "seconds". Seconds int `json:"seconds" yaml:"seconds" mapstructure:"seconds"` // Zones corresponds to the JSON schema field "zones". Zones []string `json:"zones" yaml:"zones" mapstructure:"zones"` }
func (*ExecutionItemResponse) UnmarshalJSON ¶
func (j *ExecutionItemResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ExecutionLogItemResponse ¶
type ExecutionLogItemResponse struct { // ExecutedAt corresponds to the JSON schema field "executed_at". ExecutedAt string `json:"executed_at" yaml:"executed_at" mapstructure:"executed_at"` // Seconds corresponds to the JSON schema field "seconds". Seconds int `json:"seconds" yaml:"seconds" mapstructure:"seconds"` // ZoneName corresponds to the JSON schema field "zone_name". ZoneName string `json:"zone_name" yaml:"zone_name" mapstructure:"zone_name"` }
func (*ExecutionLogItemResponse) UnmarshalJSON ¶
func (j *ExecutionLogItemResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ExecutionLogsResponseJson ¶
type ExecutionLogsResponseJson []ExecutionLogItemResponse
This schema defines the executions log response
type ProgramItemRequest ¶
type ProgramItemRequest struct { // Executions corresponds to the JSON schema field "executions". Executions []ExecutionItemRequest `json:"executions" yaml:"executions" mapstructure:"executions"` // Hour corresponds to the JSON schema field "hour". Hour string `json:"hour" yaml:"hour" mapstructure:"hour"` }
func (*ProgramItemRequest) UnmarshalJSON ¶
func (j *ProgramItemRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ProgramItemResponse ¶
type ProgramItemResponse struct { // Executions corresponds to the JSON schema field "executions". Executions []ExecutionItemResponse `json:"executions" yaml:"executions" mapstructure:"executions"` // Hour corresponds to the JSON schema field "hour". Hour string `json:"hour" yaml:"hour" mapstructure:"hour"` }
func (*ProgramItemResponse) UnmarshalJSON ¶
func (j *ProgramItemResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ProgramsResponseJson ¶
type ProgramsResponseJson struct { // Daily corresponds to the JSON schema field "daily". Daily []ProgramItemResponse `json:"daily" yaml:"daily" mapstructure:"daily"` // Even corresponds to the JSON schema field "even". Even []ProgramItemResponse `json:"even" yaml:"even" mapstructure:"even"` // Odd corresponds to the JSON schema field "odd". Odd []ProgramItemResponse `json:"odd" yaml:"odd" mapstructure:"odd"` // Temperature corresponds to the JSON schema field "temperature". Temperature []TemperatureItemResponse `json:"temperature" yaml:"temperature" mapstructure:"temperature"` // Weekly corresponds to the JSON schema field "weekly". Weekly []WeeklyItemResponse `json:"weekly" yaml:"weekly" mapstructure:"weekly"` }
This schema defines the programs response
func (*ProgramsResponseJson) UnmarshalJSON ¶
func (j *ProgramsResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type StatusResponseJson ¶
type StatusResponseJson struct { // Active corresponds to the JSON schema field "active". Active bool `json:"active" yaml:"active" mapstructure:"active"` // Humidity corresponds to the JSON schema field "humidity". Humidity float64 `json:"humidity" yaml:"humidity" mapstructure:"humidity"` // IsRaining corresponds to the JSON schema field "is_raining". IsRaining bool `json:"is_raining" yaml:"is_raining" mapstructure:"is_raining"` // SystemStartedAt corresponds to the JSON schema field "system_started_at". SystemStartedAt string `json:"system_started_at" yaml:"system_started_at" mapstructure:"system_started_at"` // Temperature corresponds to the JSON schema field "temperature". Temperature float64 `json:"temperature" yaml:"temperature" mapstructure:"temperature"` // UpdatedAt corresponds to the JSON schema field "updated_at". UpdatedAt *string `json:"updated_at,omitempty" yaml:"updated_at,omitempty" mapstructure:"updated_at,omitempty"` }
This schema defines the status response
func (*StatusResponseJson) UnmarshalJSON ¶
func (j *StatusResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type TemperatureItemRequest ¶
type TemperatureItemRequest struct { // Programs corresponds to the JSON schema field "programs". Programs []ProgramItemRequest `json:"programs" yaml:"programs" mapstructure:"programs"` // Temperature corresponds to the JSON schema field "temperature". Temperature float64 `json:"temperature" yaml:"temperature" mapstructure:"temperature"` }
func (*TemperatureItemRequest) UnmarshalJSON ¶
func (j *TemperatureItemRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type TemperatureItemResponse ¶
type TemperatureItemResponse struct { // Programs corresponds to the JSON schema field "programs". Programs []ProgramItemResponse `json:"programs" yaml:"programs" mapstructure:"programs"` // Temperature corresponds to the JSON schema field "temperature". Temperature float64 `json:"temperature" yaml:"temperature" mapstructure:"temperature"` }
func (*TemperatureItemResponse) UnmarshalJSON ¶
func (j *TemperatureItemResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type WeatherResponseJson ¶
type WeatherResponseJson struct { // Humidity corresponds to the JSON schema field "humidity". Humidity float64 `json:"humidity" yaml:"humidity" mapstructure:"humidity"` // IsRaining corresponds to the JSON schema field "is_raining". IsRaining bool `json:"is_raining" yaml:"is_raining" mapstructure:"is_raining"` // Temperature corresponds to the JSON schema field "temperature". Temperature float64 `json:"temperature" yaml:"temperature" mapstructure:"temperature"` }
This schema defines the weather response
func (*WeatherResponseJson) UnmarshalJSON ¶
func (j *WeatherResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type WeeklyItemRequest ¶
type WeeklyItemRequest struct { // Programs corresponds to the JSON schema field "programs". Programs []ProgramItemRequest `json:"programs" yaml:"programs" mapstructure:"programs"` // WeekDay corresponds to the JSON schema field "week_day". WeekDay string `json:"week_day" yaml:"week_day" mapstructure:"week_day"` }
func (*WeeklyItemRequest) UnmarshalJSON ¶
func (j *WeeklyItemRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type WeeklyItemResponse ¶
type WeeklyItemResponse struct { // Programs corresponds to the JSON schema field "programs". Programs []ProgramItemResponse `json:"programs" yaml:"programs" mapstructure:"programs"` // WeekDay corresponds to the JSON schema field "week_day". WeekDay string `json:"week_day" yaml:"week_day" mapstructure:"week_day"` }
func (*WeeklyItemResponse) UnmarshalJSON ¶
func (j *WeeklyItemResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
Source Files ¶
- activate_deactivate_server.go
- auth_middleware.go
- create_programs.go
- create_programs_request_generated.go
- create_zone.go
- create_zone_request_generated.go
- execute_zone.go
- execute_zone_request_generated.go
- execution_logs_response_generated.go
- find_all_programs.go
- find_execution_logs.go
- find_status.go
- find_weather.go
- homepage.go
- programs_response_generated.go
- remove_zone.go
- status_response_generated.go
- weather_response_generated.go