Documentation
¶
Index ¶
- func DecodeForecastResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func ForecastFrontPath(ip string) string
- func NewForecast2OK(body *ForecastResponseBody) *front.Forecast2
- func NewForecastNotUsa(body *ForecastNotUsaResponseBody) *goa.ServiceError
- func ValidateForecastNotUsaResponseBody(body *ForecastNotUsaResponseBody) (err error)
- func ValidateForecastResponseBody(body *ForecastResponseBody) (err error)
- func ValidateLocationResponseBody(body *LocationResponseBody) (err error)
- func ValidatePeriodResponseBody(body *PeriodResponseBody) (err error)
- type Client
- type ForecastNotUsaResponseBody
- type ForecastResponseBody
- type LocationResponseBody
- type PeriodResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeForecastResponse ¶
func DecodeForecastResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeForecastResponse returns a decoder for responses returned by the front forecast endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeForecastResponse may return the following errors:
- "not_usa" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func ForecastFrontPath ¶
ForecastFrontPath returns the URL path to the front service forecast HTTP endpoint.
func NewForecast2OK ¶
func NewForecast2OK(body *ForecastResponseBody) *front.Forecast2
NewForecast2OK builds a "front" service "forecast" endpoint result from a HTTP "OK" response.
func NewForecastNotUsa ¶
func NewForecastNotUsa(body *ForecastNotUsaResponseBody) *goa.ServiceError
NewForecastNotUsa builds a front service forecast endpoint not_usa error.
func ValidateForecastNotUsaResponseBody ¶
func ValidateForecastNotUsaResponseBody(body *ForecastNotUsaResponseBody) (err error)
ValidateForecastNotUsaResponseBody runs the validations defined on forecast_not_usa_response_body
func ValidateForecastResponseBody ¶
func ValidateForecastResponseBody(body *ForecastResponseBody) (err error)
ValidateForecastResponseBody runs the validations defined on ForecastResponseBody
func ValidateLocationResponseBody ¶
func ValidateLocationResponseBody(body *LocationResponseBody) (err error)
ValidateLocationResponseBody runs the validations defined on LocationResponseBody
func ValidatePeriodResponseBody ¶
func ValidatePeriodResponseBody(body *PeriodResponseBody) (err error)
ValidatePeriodResponseBody runs the validations defined on PeriodResponseBody
Types ¶
type Client ¶
type Client struct { // Forecast Doer is the HTTP client used to make requests to the forecast // endpoint. ForecastDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the front service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the front service servers.
func (*Client) BuildForecastRequest ¶
BuildForecastRequest instantiates a HTTP request object with method and path set to call the "front" service "forecast" endpoint
type ForecastNotUsaResponseBody ¶
type ForecastNotUsaResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
ForecastNotUsaResponseBody is the type of the "front" service "forecast" endpoint HTTP response body for the "not_usa" error.
type ForecastResponseBody ¶
type ForecastResponseBody struct { // Forecast location Location *LocationResponseBody `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` // Weather forecast periods Periods []*PeriodResponseBody `form:"periods,omitempty" json:"periods,omitempty" xml:"periods,omitempty"` }
ForecastResponseBody is the type of the "front" service "forecast" endpoint HTTP response body.
type LocationResponseBody ¶
type LocationResponseBody struct { // Latitude Lat *float64 `form:"lat,omitempty" json:"lat,omitempty" xml:"lat,omitempty"` // Longitude Long *float64 `form:"long,omitempty" json:"long,omitempty" xml:"long,omitempty"` // City City *string `form:"city,omitempty" json:"city,omitempty" xml:"city,omitempty"` // State State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` }
LocationResponseBody is used to define fields on response body types.
type PeriodResponseBody ¶
type PeriodResponseBody struct { // Period name Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Start time StartTime *string `form:"startTime,omitempty" json:"startTime,omitempty" xml:"startTime,omitempty"` // End time EndTime *string `form:"endTime,omitempty" json:"endTime,omitempty" xml:"endTime,omitempty"` // Temperature Temperature *int `form:"temperature,omitempty" json:"temperature,omitempty" xml:"temperature,omitempty"` // Temperature unit TemperatureUnit *string `form:"temperatureUnit,omitempty" json:"temperatureUnit,omitempty" xml:"temperatureUnit,omitempty"` // Summary Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"` }
PeriodResponseBody is used to define fields on response body types.