Documentation ¶
Index ¶
- func ExtractTarGz(r io.Reader, dest string) error
- func FindFile(root, r string) (string, string, error)
- func MoveFile(sourcePath, destPath string) error
- func ParseIPs(body []byte, expression []string) []string
- func ParseSubnet(ip, ipSub string, subnet byte) bool
- func VerifyMD5HashFromFile(file, md5sumFile string) error
- type Maxmind
- func (m *Maxmind) DownloadAndUpdate() error
- func (m *Maxmind) GetASN(ip net.IP) (company string, asn uint, err error)
- func (m *Maxmind) GetCityData(ip net.IP) (postalcode string, timezone string, city string, latitude, longitude float64, ...)
- func (m *Maxmind) GetCountry(ip net.IP) (country string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTarGz ¶
ExtractTarGz extracts a gzipped stream to dest
func FindFile ¶
FindFile returns a path to a file matching regex under root Returns
string: Full path string: File name error : Error
func ParseSubnet ¶
func VerifyMD5HashFromFile ¶
Types ¶
type Maxmind ¶
type Maxmind struct {
// contains filtered or unexported fields
}
func NewMaxmind ¶
func (*Maxmind) DownloadAndUpdate ¶
func (*Maxmind) GetCityData ¶
Click to show internal directories.
Click to hide internal directories.