mevv

package
v0.26.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package mevv is for accessing "MacroExpert VillĂĄmVilĂĄg" service.

Index

Constants

View Source
const (
	V0 = Version("v0")
	V1 = Version("v1")
	V2 = Version("v2")
	V3 = Version("v3")
)
View Source
const (
	TestHost = "40.68.241.196"
)

Variables

View Source
var ErrAuth = errors.New("authentication error")

Functions

func ReadUserPassw

func ReadUserPassw(filename string) (string, string, error)

ReadUserPassw reads the user/passw from the given file.

Types

type GetPDFParams added in v0.26.10

type GetPDFParams struct {
}

type Options

type Options struct {
	Since, Till                      time.Time `json:"-"`
	At                               time.Time `json:"eventDate"`
	Address                          string    `json:"address"`
	ContractID                       string    `json:"-"`
	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 Request added in v0.26.10

type Request struct {
	Options
	ReferenceNo        string   `json:"referenceNo"`
	ResultTypes        []string `json:"resultTypes"`
	SelectedOperations []string `json:"selectedOperations"`
}

func (*Request) Prepare added in v0.26.10

func (req *Request) Prepare()

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�

func (Version) LatKey added in v0.26.10

func (V Version) LatKey() string

func (Version) LngKey

func (V Version) LngKey() string

func (Version) RefKey

func (V Version) RefKey() string

func (Version) URL

func (V Version) URL() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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