external

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package external contains the API of all services external to Sia.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSCRates

func FetchSCRates() (map[string]float64, error)

FetchSCRates retrieves the Siacoin exchange rates.

Types

type IPInfo

type IPInfo struct {
	IP       string `json:"ip"`
	HostName string `json:"hostname"`
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	Location string `json:"loc"`
	ISP      string `json:"org"`
	ZIP      string `json:"postal"`
	TimeZone string `json:"timezone"`
}

IPInfo contains the geolocation data of a host.

func FetchIPInfo

func FetchIPInfo(addr, token string) (IPInfo, error)

FetchIPInfo uses the IPInfo API to fetch the host's geolocation.

Jump to

Keyboard shortcuts

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