network

package
Version: v0.0.0-...-2443ee7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 7 Imported by: 0

README

nework

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPAddrs

func GetIPAddrs() ([]net.Addr, error)

GetIPAddrs gets private ip addresses

func GetIPAddrsAsString

func GetIPAddrsAsString() ([]string, error)

GetIPAddrsAsString gets private ip addresses as string

Types

type IPInfo

type IPInfo struct {
	IP       string `json:"ip"`
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	LOC      string `json:"loc"`
	Org      string `json:"org"`
	Timezone string `json:"timezone"`
	Readme   string `json:"readme"`
}

IPInfo defines ip information

func GetPublicIPInfo

func GetPublicIPInfo() (IPInfo, error)

GetPublicIPInfo gets public ip information

Source Files

Jump to

Keyboard shortcuts

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