Documentation
¶
Index ¶
- func CloudflareMiddleware() web.Middleware
- func GetClientIP(c ctx) net.IP
- func GetCountryName(c ctx) *string
- func GetProxyIPs(c ctx) []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 GeoIP
- type MaxMindConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudflareMiddleware ¶ added in v0.9.0
func CloudflareMiddleware() web.Middleware
CloudflareMiddleware determine geo-ip information when proxying through Cloudflare
func GetClientIP ¶
func GetCountryName ¶
func GetCountryName(c ctx) *string
func GetProxyIPs ¶
func MaxMindMiddleware ¶ added in v0.9.0
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 MaxMindConfig ¶
type MaxMindConfig struct {
DB string `yaml:"maxminddb"`
}
MaxMindConfig MaxMind database config
func (*MaxMindConfig) Default ¶
func (v *MaxMindConfig) Default()
Click to show internal directories.
Click to hide internal directories.