location

package
v0.3.23 Latest Latest
Warning

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

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

Documentation

Overview

Package location implements API functions residing under /core/location.json. This path contains methods for querying existing locations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	List(ctx context.Context, page, limit int, search string) ([]Location, error)
}

API contains methods for location listing.

func NewAPI

func NewAPI(c client.Client) API

NewAPI creates a new VLAN API instance with the given client.

type Location

type Location struct {
	Code        string `json:"code"`
	CityCode    string `json:"city_code"`
	Country     string `json:"country"`
	ID          string `json:"identifier"`
	Latitude    string `json:"lat"`
	Longitude   string `json:"lon"`
	Name        string `json:"name"`
	CountryName string `json:"country_name"`
}

Location is the metadata of a single location.

Jump to

Keyboard shortcuts

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