advisory

package
Version: v0.0.0-...-b472bfd Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package advisory is providing support to query the Travel Advisory API and retrieve an advisory for a specified city. www.travel-advisory.info

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

type Advisory struct {
	Country     string  `json:"country"`
	CountryCode string  `json:"country_code"`
	Continent   string  `json:"continent"`
	Score       float64 `json:"score"`
	LastUpdated string  `json:"last_updated"`
	Message     string  `json:"message"`
	Source      string  `json:"source"`
}

Advisory contains the travel advisory result captured for a city. When the advisory score is below 4 out of 5, it's not considered safe to travel.

func Search(ctx context.Context, url string, countryCode string) (Advisory, error)

Search can locate weather for a given latitude and longitude.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL