location

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLocationDB

func InitLocationDB() error

Types

type Info

type Info struct {
	CountryName     string `json:"country_name"`
	CountryLongName string `json:"country_long"`
	RegionName      string `json:"region_name"`
	CityName        string `json:"city_name"`
	Latitude        string `json:"latitude"`
	Longitude       string `json:"longitude"`
}

func GetLocation

func GetLocation(ip string) (error, *Info)

type OSIO

type OSIO struct {
	Stat     func(string) (os.FileInfo, error)
	Create   func(string) (*os.File, error)
	MkdirAll func(string, os.FileMode) error
	OpenFile func(string, int, os.FileMode) (*os.File, error)
	Copy     func(io.Writer, io.Reader) (int64, error)
}

Jump to

Keyboard shortcuts

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