api

package
v0.0.0-...-8d6a1ef Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerResponse

type ServerResponse struct {
	URL             string `json:"url"`
	Lat             string `json:"lat"`
	Lon             string `json:"lon"`
	Distance        int    `json:"distance"`
	Name            string `json:"name"`
	Country         string `json:"country"`
	Cc              string `json:"cc"`
	Sponsor         string `json:"sponsor"`
	ID              string `json:"id"`
	Preferred       int    `json:"preferred"`
	HTTPSFunctional int    `json:"https_functional"`
	Host            string `json:"host"`
}

ServerResponse is the response object from Speedtest API.

func SearchByName

func SearchByName(query string) ([]ServerResponse, error)

SearchByName uses Speedtest API to retrieve a list of servers relative to the query, for a maximum of 10 elements.

Jump to

Keyboard shortcuts

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