mirror of
https://github.com/qdm12/gluetun.git
synced 2025-12-10 20:07:32 -06:00
33 lines
894 B
Go
33 lines
894 B
Go
package models
|
|
|
|
import (
|
|
"net/netip"
|
|
)
|
|
|
|
type PublicIP struct {
|
|
IP netip.Addr `json:"public_ip,omitempty"`
|
|
Region string `json:"region,omitempty"`
|
|
Country string `json:"country,omitempty"`
|
|
City string `json:"city,omitempty"`
|
|
Hostname string `json:"hostname,omitempty"`
|
|
Location string `json:"location,omitempty"`
|
|
Organization string `json:"organization,omitempty"`
|
|
PostalCode string `json:"postal_code,omitempty"`
|
|
Timezone string `json:"timezone,omitempty"`
|
|
}
|
|
|
|
func (p *PublicIP) Copy() (publicIPCopy PublicIP) {
|
|
publicIPCopy = PublicIP{
|
|
IP: p.IP,
|
|
Region: p.Region,
|
|
Country: p.Country,
|
|
City: p.City,
|
|
Hostname: p.Hostname,
|
|
Location: p.Location,
|
|
Organization: p.Organization,
|
|
PostalCode: p.PostalCode,
|
|
Timezone: p.Timezone,
|
|
}
|
|
return publicIPCopy
|
|
}
|