models

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WinCurrent = 0
	Win1       = 1
	Win5       = 5
	Win10      = 10
	Win15      = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Forecast

type Forecast struct {
	CloudCoverage   float32   `json:"cloudCoverage" jsonschema:"description=Could coverage as percentage"`
	DateTime        time.Time `json:"dateTime" jsonschema:"description=The time and date the forecast data is applicable"`
	Humidity        float32   `json:"humidity" jsonschema:"description=The relative humidity as percentage"`
	RainProbability float32   `json:"rainProbability" jsonschema:"description=The probability of rain as percentage"`
	RainVolume      float32   `json:"rainVolume" jsonschema:"The cumulative volume of rain in mm"`
	SnowProbability float32   `json:"snowProbability" jsonschema:"description=The probability of snow as percentage"`
	SnowVolume      float32   `json:"snowVolume" jsonschema:"description=The cumulative snow volume in mm"`
	Temp            float32   `json:"temperature" jsonschema:"required,description=Average temperature in celsius"`
	TempFeel        float32   `json:"temperatureFeel" jsonschema:"description=Average feels like temperature in celsius"`
	TempMax         float32   `json:"temperatureMax" jsonschema:"description=Maximum temperature in celsius"`
	TempMaxFeel     float32   `json:"temperatureFeelMax" jsonschema:"description=Maximum feels like temperature in celsius"`
	TempMin         float32   `json:"temperatureMin" jsonschema:"description=Minimum temperature in celsius"`
	TempMinFeel     float32   `json:"temperatureFeelMin" jsonschema:"description=Minimum feels like temperature in celsius"`
	WindDirection   float32   `json:"windDirection" jsonschema:"description=Wind direction in degrees"`
	WindSpeed       float32   `json:"windSpeed" jsonschema:"description=Wind speed in m/s"`
}

type ForecastResponse

type ForecastResponse struct {
	Data ForecastResponseData `json:"data"`
	ResponseContext
	Signature ForecastSignature `json:"signature"`
}

type ForecastResponseData

type ForecastResponseData struct {
	Forecasts []Forecast `json:"forecasts"`
}

type ForecastResponseDataSignature

type ForecastResponseDataSignature struct {
	Forecasts []Forecast `json:"forecasts"`
	Signed    time.Time  `json:"__signed__"`
}

type ForecastService

type ForecastService interface {
	Get(*Params) ([]Forecast, error)
}

type ForecastSignature

type ForecastSignature struct {
	Created        time.Time `json:"created"`
	Creator        string    `json:"creator"`
	SignatureValue string    `json:"signatureValue"`
	Type           string    `json:"type"`
}

type GeoPositionService

type GeoPositionService interface {
	Get(*Location) (string, error)
}

type Location

type Location struct {
	Lat float32 `json:"latitude" validate:"required"`
	Lng float32 `json:"longitude" validate:"required"`
}

type POTContext added in v1.1.0

type POTContext struct {
	Context struct {
		Version float32 `json:"@version"`
		Schema  string  `json:"@schema"`
	} `json:"@context"`
}

type Params

type Params struct {
	TargetObject Location `` /* 176-byte string literal not displayed */
	Period       int      `` /* 246-byte string literal not displayed */
}

type RequestParameters

type RequestParameters struct {
	ResponseContext
	Parameters  Params    `json:"parameters" jsonschema:"required"`
	ProductCode string    `json:"productCode" validate:"required"`
	Timestamp   time.Time `json:"timestamp" validate:"required"`
}

type ResponseContext

type ResponseContext struct {
	Context string `json:"@context" validate:"required" jsonschema:"required,description=The context to be used for the payload."`
}

type Window

type Window int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL