location

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	Name string `json:"name"`
	Flag string `json:"country_flag"`
}

type Country

type Country struct {
	Alpha string `json:"alpha_3"`
	Code  string `json:"code"`
	Name  string `json:"name"`
	Flag  string `json:"flag"`
}

type FS added in v1.8.0

type FS struct {
	vfs.FS
}

func (*FS) GetDiskUsage added in v1.8.0

func (*FS) GetDiskUsage(path string) (vfs.DiskUsage, error)

func (*FS) List added in v1.8.0

func (fs *FS) List(dir string) ([]string, error)

func (*FS) Lock added in v1.8.0

func (*FS) Lock(name string) (io.Closer, error)

func (*FS) Open added in v1.8.0

func (fs *FS) Open(name string, opts ...vfs.OpenOption) (vfs.File, error)

func (*FS) OpenDir added in v1.8.0

func (fs *FS) OpenDir(name string) (vfs.File, error)

func (*FS) PathBase added in v1.8.0

func (fs *FS) PathBase(path string) string

func (*FS) PathDir added in v1.8.0

func (fs *FS) PathDir(path string) string

func (*FS) PathJoin added in v1.8.0

func (fs *FS) PathJoin(elem ...string) string

func (*FS) Stat added in v1.8.0

func (fs *FS) Stat(name string) (vfs.FileInfo, error)

type Location added in v1.8.0

type Location struct {
	// contains filtered or unexported fields
}

func New added in v1.8.0

func New() *Location

func (*Location) Close added in v1.8.0

func (lo *Location) Close() error

func (*Location) DB added in v1.8.0

func (lo *Location) DB() *pebble.DB

func (*Location) GetCity added in v1.8.0

func (l *Location) GetCity(code uint32) (city City)

func (*Location) GetCityCode added in v1.8.0

func (lo *Location) GetCityCode(country, city string) (code uint32)

func (*Location) GetCountry added in v1.8.0

func (l *Location) GetCountry(code string) (co Country)

func (*Location) GetReferral added in v1.8.0

func (lo *Location) GetReferral(domain string) (code []byte)

func (*Location) GetRegion added in v1.8.0

func (l *Location) GetRegion(code []byte) (r Region)

func (*Location) GetRegionCode added in v1.8.0

func (lo *Location) GetRegionCode(region string) (code []byte)

type Region

type Region struct {
	Name string `json:"name"`
	Flag string `json:"flag"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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