Documentation
¶
Index ¶
- func CloudflareMiddleware() web.Middleware
- func GetClientIP(ctx context.Context) net.IP
- func GetCountryName(ctx context.Context) string
- func GetProxyIPs(ctx context.Context) []net.IP
- func MaxMindMiddleware(resolver GeoIP) web.Middleware
- func SetClientIP(ctx context.Context, value net.IP) context.Context
- func SetCountryName(ctx context.Context, value string) context.Context
- func SetProxyIPs(ctx context.Context, value []net.IP) context.Context
- func WithMaxMindGeoIP() plugins.Plugin
- type ConfigMaxMind
- type GeoIP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudflareMiddleware ¶
func CloudflareMiddleware() web.Middleware
CloudflareMiddleware determine geo-ip information when proxying through Cloudflare
func GetCountryName ¶
func MaxMindMiddleware ¶
func MaxMindMiddleware(resolver GeoIP) web.Middleware
MaxMindMiddleware determine geo-ip information through local MaxMind database
func WithMaxMindGeoIP ¶
WithMaxMindGeoIP information resolver through local MaxMind database
Types ¶
type ConfigMaxMind ¶
type ConfigMaxMind struct { GeoIP struct { MaxMindDB string `yaml:"maxminddb"` } `yaml:"geoip"` }
func (*ConfigMaxMind) Default ¶
func (v *ConfigMaxMind) Default()
Click to show internal directories.
Click to hide internal directories.