Documentation ¶
Overview ¶
Package mevv is for accessing "MacroExpert VillĂĄmVilĂĄg" service.
Index ¶
Constants ¶
const ( V0 = Version("v0") V1 = Version("v1") V2 = Version("v2") V3 = Version("v3") V3test = Version("v3-test") )
const (
TestHost = "40.68.241.196"
)
Variables ¶
var ErrAuth = errors.New("authentication error")
Functions ¶
Types ¶
type Options ¶
type Options struct {
Since, Till time.Time `json:"-"`
At time.Time `json:"eventDate"`
Address string `json:"address"`
ContractID string `json:"referenceNo"`
Host string `json:"-"`
Lat float64 `json:"locationLat"`
Lng float64 `json:"locationLon"`
Interval int `json:"interval"`
NeedThunders, NeedIce, NeedWinds bool `json:"-"`
NeedRains, NeedRainsIntensity bool `json:"-"`
NeedTemperature bool `json:"-"`
ExtendedLightning bool `json:"extendedRange"`
NeedPDF, NeedData bool `json:"-"`
WithStatistics bool `json:"withStatistic"`
}
Options are the space/time coordinates and the required details.
type V3Error ¶ added in v0.26.11
type V3Lightning ¶ added in v0.26.11
type V3Lightning struct { EventDateUTC time.Time `json:"eventDateUtc"` EventDate time.Time `json:"eventDate"` Zone string Type string `json:"lightningType"` Index int Altitude float64 `json:"altitude"` CurrentIntensity float64 `json:"currentIntensity"` DistanceFromOrigin float64 `json:"distanceFromOrigin"` }
type V3Measurement ¶ added in v0.26.11
type V3Measurement struct { Date string `json:"dateString"` Hour string `json:"hour"` Code json.Number `json:"code"` Settlement string `json:"settlementText"` Value json.RawMessage `json:"value"` TemperatureMin float64 `json:"temperatureMin"` TemperatureMax float64 `json:"temperatureMax"` PrecipitationMax float64 `json:"precipitationMax"` DroughtIndex1 bool `json:"droughtIndex"` DroughtIndex2 bool `json:"droughtIndex2"` }
type V3Query ¶ added in v0.26.11
type V3Response ¶ added in v0.26.11
type V3Response struct { Data V3ResultData `json:"resultData"` File V3File `json:"file"` Errors []V3Error `json:"errors"` OperationID int `json:"operationId"` Successful bool `json:"isSuccessful"` }
type V3ResultData ¶ added in v0.26.11
type V3ResultData struct { DateFrom time.Time `json:"dateFrom"` DateTo time.Time `json:"dateTo"` EventDate time.Time `json:"eventDate"` Address string `json:"address"` ReferenceNo string `json:"referenceNo"` DailyListWind []V3Measurement `json:"dailyListWind"` DailyListPrecipitation []V3Measurement `json:"dailyListPrecipitation"` DailyListPrecipitationIntensity []V3Measurement `json:"dailyListPrecipitationIntensity"` DailyListIce []V3Measurement `json:"dailyListIce"` DailyListTemperature []V3Measurement `json:"dailyListTemperature"` LightningList []V3Lightning `json:"lightingList"` ByStationList []V3Measurement `json:"byStationList"` AgroFrostList []V3Measurement `json:"agroFrostList"` AgroExtendedList []V3Measurement `json:"agroFrostExtendedList"` Drought []V3Drought `json:"agroDroughtList"` DroughtExtendedList []V3Measurement `json:"agroDroughtExtendedList"` Statistics []V3Statistic `json:"statisticsList"` Lat float64 `json:"locationLat"` Lon float64 `json:"locationLon"` Interval int `json:"interval"` LightningRadius int `json:"lightningRadius"` Visibility V3Visibility `json:"visibility"` }
type V3Statistic ¶ added in v0.26.11
type V3Visibility ¶ added in v0.26.11
type V3Visibility struct { Daily bool `json:"hasDailyData"` DailyWind bool `json:"hasDailyData_Wind"` DailyPrecipitation bool `json:"hasDailyData_Precipitation"` DailyPrecipitationIntensity bool `json:"hasDailyData_PrecipitationIntensity"` DailyIce bool `json:"hasDailyData_Ice"` DailyTemperature bool `json:"hasDailyData_Temperature"` Lightning bool `json:"hasLightingData"` ByStationTemperature bool `json:"hasByStationTemperature"` ByStationPrecipitation bool `json:"hasByStationPrecipitation"` ByStationWind bool `json:"hasByStationWind"` AgroFrost bool `json:"hasAgroFrost"` AgroFrostExtended bool `json:"hasAgroFrostExtended"` AgroDrought bool `json:"hasAgroDrought"` AgroDroughtExtended bool `json:"hasAgroDroughtExtended"` Statistic bool `json:"hasStatistic"` }
type Version ¶
type Version string
func (Version) GetPDF ¶
func (V Version) GetPDF( ctx context.Context, username, password string, opt Options, ) (rc io.ReadCloser, fileName, mimeType string, err error)
GetPDF returns the meteorological data in PDF form.
address M varchar(45) Keresett cĂm hĂĄzszĂĄmmal lat M float(8,5) SzĂŠlessĂŠg pl.: â��47.17451â�� lng M float(8,5) HosszĂşsĂĄg pl.: â��17.04234â�� from_date M date(YYYY-MM-DD) KezdĹ� datum pl.: â��2014-11-25â�� to_date M date(YYYY-MM-DD) ZĂĄrĂł datum pl.: â��2014-11-29â�� contr_id O varchar(25) KĂĄrszĂĄm pl.: â��KSZ-112233â�� needThunders O varchar(1) VillĂĄm adatokat kĂŠrek â��1â��â��kĂŠrem, â��0â��-nem needRains O varchar(1) CsapadĂŠk adatokat kĂŠrek â��1â��â��kĂŠrem, â��0â��-nem needWinds O varchar(1) SzĂŠl adatokat kĂŠrek â��1â�� â�� kĂŠrem, â��0â��-nem needRainsInt O varchar(1) Fix - â��0â�� language O varchar(2) Fix - â��huâ��