Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mpolden/echoip
/ functions
Functions
87 in github.com/mpolden/echoip
⨍
Functions
87
◇
Types & classes
18
↓ 21 callers
Method
Route
(method, path string, handler appHandler)
http/router.go:24
↓ 17 callers
Method
AsJSON
()
http/error.go:28
↓ 14 callers
Method
Set
(ip net.IP, resp Response)
http/cache.go:42
↓ 14 callers
Method
WithMessage
(message string)
http/error.go:33
↓ 13 callers
Function
badRequest
(err error)
http/error.go:24
↓ 11 callers
Method
String
()
cmd/echoip/main.go:17
↓ 8 callers
Method
Header
(header, value string)
http/router.go:51
↓ 8 callers
Method
newResponse
(r *http.Request)
http/http.go:131
↓ 7 callers
Function
internalServerError
(err error)
http/error.go:12
↓ 6 callers
Method
Get
(ip net.IP)
http/cache.go:69
↓ 6 callers
Method
Handler
()
http/http.go:437
↓ 5 callers
Function
NewCache
(capacity int)
http/cache.go:25
↓ 5 callers
Function
testServer
()
http/http_test.go:42
↓ 5 callers
Function
wrapHandlerFunc
(f http.HandlerFunc)
http/http.go:404
↓ 4 callers
Function
httpGet
(url string, acceptMediaType string, userAgent string)
http/http_test.go:46
↓ 4 callers
Function
ipFromRequest
ipFromRequest detects the IP address for this transaction. * `headers` - the specific HTTP headers to trust * `r` - the incoming HTTP request * `cust
http/http.go:83
↓ 3 callers
Function
Parse
(s string)
useragent/useragent.go:14
↓ 3 callers
Function
key
(ip net.IP)
http/cache.go:36
↓ 2 callers
Method
ASN
(net.IP)
iputil/geo/geo.go:13
↓ 2 callers
Method
City
(net.IP)
iputil/geo/geo.go:12
↓ 2 callers
Method
Country
(net.IP)
iputil/geo/geo.go:11
↓ 2 callers
Method
MatcherFunc
(f func(*http.Request) bool)
http/router.go:57
↓ 2 callers
Function
Open
(countryDB, cityDB string, asnDB string)
iputil/geo/geo.go:45
↓ 2 callers
Method
Resize
(capacity int)
http/cache.go:80
↓ 2 callers
Method
RoutePrefix
(method, path string, handler appHandler)
http/router.go:34
↓ 2 callers
Function
ToDecimal
(ip net.IP)
iputil/iputil.go:30
↓ 2 callers
Function
formatCoordinate
(c float64)
http/http.go:491
↓ 2 callers
Function
testIpFromRequest
(t *testing.T, tests []ipTestCase)
http/http_test.go:264
↓ 2 callers
Function
userAgentFromRequest
(r *http.Request)
http/http.go:121
↓ 1 callers
Method
IsEmpty
()
iputil/geo/geo.go:14
↓ 1 callers
Method
IsJSON
()
http/error.go:38
↓ 1 callers
Method
ListenAndServe
(addr string)
http/http.go:487
↓ 1 callers
Function
New
(db geo.Reader, cache *Cache, profile bool)
http/http.go:66
↓ 1 callers
Function
NewRouter
()
http/router.go:20
↓ 1 callers
Function
NotFoundHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:385
↓ 1 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
http/http.go:411
↓ 1 callers
Method
Stats
()
http/cache.go:91
↓ 1 callers
Function
cliMatcher
(r *http.Request)
http/http.go:393
↓ 1 callers
Function
httpPost
(url, body string)
http/http_test.go:67
↓ 1 callers
Function
ipFromForwardedForHeader
(v string)
http/http.go:70
↓ 1 callers
Method
match
(req *http.Request)
http/router.go:61
↓ 1 callers
Method
newPortResponse
(r *http.Request)
http/http.go:177
↓ 1 callers
Function
notFound
(err error)
http/error.go:20
Method
ASN
(net.IP)
http/http_test.go:36
Method
ASN
(ip net.IP)
iputil/geo/geo.go:136
Method
CLIASNHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:240
Method
CLIASNOrgHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:249
Method
CLICityHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:222
Method
CLICoordinatesHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:231
Method
CLICountryHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:204
Method
CLICountryISOHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:213
Method
CLIHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:195
Method
City
(net.IP)
http/http_test.go:32
Method
City
(ip net.IP)
iputil/geo/geo.go:96
Method
Country
(net.IP)
http/http_test.go:28
Method
Country
(ip net.IP)
iputil/geo/geo.go:71
Method
DefaultHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:342
Method
Handler
()
http/router.go:40
Method
HeadHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:278
Method
HealthHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:272
Method
IsEmpty
()
http/http_test.go:40
Method
IsEmpty
()
iputil/geo/geo.go:154
Method
JSONHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:258
Function
LookupAddr
(ip net.IP)
iputil/iputil.go:11
Function
LookupPort
(ip net.IP, port uint64)
iputil/iputil.go:20
Method
PortHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:284
Method
Set
(v string)
cmd/echoip/main.go:21
Function
TestCLIHandlers
(t *testing.T)
http/http_test.go:84
Function
TestCLIMatcher
(t *testing.T)
http/http_test.go:287
Function
TestCacheCapacity
(t *testing.T)
http/cache_test.go:9
Function
TestCacheDuplicate
(t *testing.T)
http/cache_test.go:48
Function
TestCacheHandler
(t *testing.T)
http/http_test.go:189
Function
TestCacheResize
(t *testing.T)
http/cache_test.go:63
Function
TestCacheResizeHandler
(t *testing.T)
http/http_test.go:204
Function
TestDisabledHandlers
(t *testing.T)
http/http_test.go:121
Function
TestIPv4FromRequest
(t *testing.T)
http/http_test.go:219
Function
TestIPv6FromRequest
(t *testing.T)
http/http_test.go:241
Function
TestJSONHandlers
(t *testing.T)
http/http_test.go:155
Function
TestMultiValueFlagString
(t *testing.T)
cmd/echoip/main_test.go:5
Function
TestParse
(t *testing.T)
useragent/useragent_test.go:7
Function
TestToDecimal
(t *testing.T)
iputil/iputil_test.go:9
Method
cacheHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:322
Method
cacheResizeHandler
(w http.ResponseWriter, r *http.Request)
http/http.go:298
Function
init
()
cmd/echoip/main.go:26
Function
lookupAddr
(net.IP)
http/http_test.go:16
Function
lookupPort
(net.IP, uint64)
http/http_test.go:17
Function
main
()
cmd/echoip/main.go:31