Documentation
¶
Index ¶
- Constants
- type ChainClient
- type Client
- func NewIfConfigClient(ctx context.Context, config cfg.Config, logger log.Logger) (Client, error)
- func NewIpInfoClient(ctx context.Context, config cfg.Config, logger log.Logger) (Client, error)
- func ProvideIfConfigClient(ctx context.Context, config cfg.Config, logger log.Logger) (Client, error)
- func ProvideIpInfoClient(ctx context.Context, config cfg.Config, logger log.Logger) (Client, error)
- type Data
- type Factory
- type IfConfigClient
- type IfConfigData
- type IpInfoClient
- type IpInfoData
- type ProviderChainConfig
Constants ¶
View Source
const ( ProviderIpInfo = "ipinfo" ProviderIfconfig = "ifconfig" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainClient ¶
type ChainClient struct {
// contains filtered or unexported fields
}
func ProvideChainClient ¶
type Data ¶
type Data struct {
Ip string `json:"ip"`
Hostname string `json:"hostname"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
Loc string `json:"loc"`
Org string `json:"org"`
Postal string `json:"postal"`
Timezone string `json:"timezone"`
Readme string `json:"readme"`
}
type IfConfigClient ¶
type IfConfigClient struct {
// contains filtered or unexported fields
}
type IfConfigData ¶
type IfConfigData struct {
Ip string `json:"ip"`
Hostname string `json:"hostname"`
City string `json:"city"`
RegionName string `json:"region_name"`
CountryIso string `json:"country_iso"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
AsnOrg string `json:"asn_org"`
ZipCode string `json:"zip_code"`
Timezone string `json:"time_zone"`
}
type IpInfoClient ¶
type IpInfoClient struct {
// contains filtered or unexported fields
}
type IpInfoData ¶
type IpInfoData struct {
Ip string `json:"ip"`
Hostname string `json:"hostname"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
Loc string `json:"loc"`
Org string `json:"org"`
Postal string `json:"postal"`
Timezone string `json:"timezone"`
Readme string `json:"readme"`
}
type ProviderChainConfig ¶
type ProviderChainConfig struct {
Providers []string `cfg:"providers" json:"providers" default:"ipinfo,ifconfig"`
}
Click to show internal directories.
Click to hide internal directories.