mevv

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 18 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")
)
View Source
const (
	TestHost = "40.68.241.196"
)

Variables

View Source
var ErrAuth = errors.New("authentication error")
View Source
var InsecureTransport = &http.Transport{
	Proxy:           http.ProxyFromEnvironment,
	TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	DialContext: (&net.Dialer{
		Timeout:   30 * time.Second,
		KeepAlive: 30 * time.Second,
		DualStack: true,
	}).DialContext,
	MaxIdleConns:          100,
	IdleConnTimeout:       90 * time.Second,
	TLSHandshakeTimeout:   10 * time.Second,
	ExpectContinueTimeout: 1 * time.Second,
}
View Source
var Log = func(...interface{}) error { return nil }

Log is used for logging.

Functions

func ReadUserPassw

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

ReadUserPassw reads the user/passw from the given file.

Types

type Options

type Options struct {
	Since, Till                      time.Time
	At                               time.Time
	Address                          string
	ContractID                       string
	Host                             string
	Lat, Lng                         float64
	Interval                         int
	NeedThunders, NeedIce, NeedWinds bool
	NeedRains, NeedRainsIntensity    bool
	ExtendedLightning                bool
	WithStatistics                   bool
}

Options are the space/time coordinates and the required details.

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) 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