server

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package server provides an API for looking up location data via IP address or query.

It is based on the MaxMind GeoLite2 database, and can provide results as JSON, JavaScript, XML, HTML or plaintext.

Index

Constants

This section is empty.

Variables

View Source
var Assets = func() http.FileSystem {
	fs := vfsgen۰FS{
		"/": &vfsgen۰DirInfo{
			name:    "/",
			modTime: time.Date(2019, 12, 10, 0, 1, 22, 206946611, time.UTC),
		},
		"/favicon.ico": &vfsgen۰CompressedFileInfo{
			name:             "favicon.ico",
			modTime:          time.Date(2019, 9, 17, 8, 26, 9, 877260297, time.UTC),
			uncompressedSize: 18094,

			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4b\x88\x1c\x45\x18\xae\x9d\x38\x49\x30\x3e\x26\x6e\x54\x12\x90\xec\xa7\x08\x63\x34\x66\xf0\x11\xc4\x8c\x90\x98\x83\x89\x22\x31\x07\x2f\x1e\xc4\x07\x7a\xf5\x90\x83\x20\x78\x70\x0f\x7b\x08\xc9\xf8\x82\x60\x82\xaf\x51\xd7\x17\x09\x1e\x22\x8a\x88\x11\x8c\x8a\x07\xe3\x41\x51\xa2\x12\x7f\x34\x51\xe3\x33\x89\x24\x1a\xd7\x5d\x57\x4a\xff\x82\xa6\x98\xae\xae\xea\xf9\xab\x67\x57\xea\x83\x8f\xdd\x69\xea\xff\xbf\xaf\x7b\xba\xeb\xd5\xff\x28\x35\xa4\xe6\xa8\x46\x43\xff\x1d\x51\xcd\xba\x52\x2b\x95\x52\x23\x23\xfc\x79\x91\x52\xb7\xd6\x95\x6a\xb5\xf8\xf3\x72\xa5\xc6\x16\x2b\xd5\x54\x4a\x35\x74\x3b\xf5\xdf\xf1\x7f\x51\x57\xd1\x00\x50\x2f\xce\xef\x75\xdc\x33\xfe\x16\x80\xbe\x02\x68\x69\x89\xf8\x9b\x01\x9a\x04\x68\x9a\x73\x9c\x17\x10\x7f\x13\x40\x7f\x71\xac\xe1\x97\x00\x2d\xf1\x88\x5f\x0f\xd0\x9f\x56\xac\xe1\x7e\x80\xce\x76\xc4\x03\xa0\xdf\x72\x62\x0d\xdf\x72\xc4\xef\xb0\xda\xbe\x0f\xd0\x56\x80\x0e\x5b\xc7\xd7\xe6\xc4\x1f\xcc\xb4\xf9\x02\xa0\x53\xf8\x9c\x2e\xb7\xe2\x37\xe7\xc4\x4f\x64\xda\xbc\x9e\xb9\x9e\xa7\x59\xf1\xdd\x9c\xf8\xef\x32\x6d\xf4\xf5\xdf\x00\xd0\x99\x00\x6d\xb3\xe2\xb7\xe6\xc4\x77\x0b\xae\x9d\xe1\xfa\x9c\xf8\x26\x40\xbf\x17\xc4\xbe\x07\xd0\x50\x4e\xbc\xb9\x77\xfe\xc8\x89\xfd\xcc\xdc\x43\x8e\x78\xcd\x65\x00\x8d\xf3\xf7\x76\x12\xa0\xcf\x01\x1a\x05\xe8\x74\xd7\xfd\x97\x50\x0e\x4d\xee\x23\x57\x67\xfb\xc9\x45\x83\x76\x95\x30\x1b\x90\x33\xe6\xd9\x9c\x0b\xd0\x63\x00\x5d\xe8\xd9\x5e\x52\x7f\x3e\xf7\xc5\xd3\xdc\xbf\x2e\xab\x50\xff\x54\x1e\xaf\xb2\x7d\xe0\x8f\x00\xad\xa8\x40\x5f\xf7\x95\xef\xe4\xf4\xc3\xbf\x02\x74\x65\x44\xfd\x06\x40\x1f\x14\x8c\x23\xc7\x00\x5a\x15\x41\x7f\x18\xa0\x7d\x9e\xe3\xe0\x71\x80\xd6\x08\xea\x9f\x03\xd0\xc7\x9e\xda\x86\x7a\xbc\x5d\x27\xa0\x3f\xcc\xe3\x6b\x88\xb6\xa1\x9e\xaf\x5d\xd7\x87\xfe\x3c\x80\xde\x2d\xa9\x6d\xa8\xe7\x7d\x97\x96\xd4\x1f\xed\x53\xdb\xf0\x13\x80\xe6\x04\xea\x2f\xf1\x98\x33\x85\xf0\x8e\x40\xfd\x4d\x1e\x39\xf7\x00\xb4\x05\xa0\xe7\x01\x3a\x51\xd0\x76\x6f\xa0\xfe\xdb\x8e\x5c\x7f\xf3\x1a\x26\x7b\x9f\xea\x39\x3e\x39\x62\xa6\x00\x5a\x18\xa0\x7f\xd0\x91\xeb\x99\x9c\xfe\xe5\xfa\x82\x6b\x70\x59\x80\xfe\x49\x47\x9e\x3b\x73\xf4\xed\xf5\x80\xcd\x75\x01\xfa\xbf\x38\xf2\xdc\x97\xa3\x7f\x41\x81\x7e\x3b\x40\xdf\xd5\xdf\x7d\xcd\xeb\x17\x5b\xff\xf1\x02\xfd\xf3\x03\xf4\x1f\x2d\xc8\xa5\xfd\xad\xe5\xf1\xf0\x22\x80\x9e\x2e\x68\xff\x4d\xe0\xfd\xbf\x5a\xf0\xd9\xd7\x7c\xb8\x44\xff\xb7\x47\x48\xfb\x84\x6b\x7d\xe6\xd0\xbf\x84\xc7\xd2\x7e\xf5\x37\xf5\x31\xfe\xdd\xc8\x7d\x47\x59\xed\x27\x04\xc6\x7f\xdd\xaf\x1c\x29\xa1\xbd\xc5\x8c\x3b\x02\xf3\x1f\xfd\x6c\xef\xf2\xd4\xdd\xcf\x7b\x0c\x31\xe6\x9f\x7a\x8e\xfb\x00\xef\x17\x1c\xe2\x39\xc6\xcf\x00\x7d\xca\xcf\xff\x46\xfb\x9c\xcb\xe8\x27\x24\x24\x24\x24\xc4\x47\x53\x29\xd5\x52\x4a\xdd\x96\xdd\x27\x5c\x3e\x68\x57\x09\x09\x09\x55\xa2\x68\xef\xb2\x80\x1d\x80\xc6\xfa\xc9\x31\x40\xff\x0f\x65\xe6\xce\x9b\x67\x99\xff\x5e\xeb\xe4\xce\x2c\xf0\x3f\xd4\xe3\xfd\x67\x96\x8f\xcc\x60\xff\xda\xfb\x76\x8f\x75\xd8\x36\x6e\x3b\x93\xfc\xd7\x3c\xf6\x69\xb2\xdc\xe1\x7b\x0e\x15\xf8\xd7\xde\x9f\x2a\xb9\x07\x50\x1b\xb0\xff\x5a\xc0\x7b\xfc\x5e\xec\x16\x9d\x43\x44\xff\x7a\x3d\xff\x9c\xc0\x3e\xd0\x78\xcc\xbd\x01\x87\xf7\x17\x04\xbc\x1b\xbe\x98\xa9\x1f\x89\xed\x5f\xeb\xbc\x2c\xe8\xdd\x70\x27\x40\xf5\xc8\xfe\x6b\xc2\xd7\xdd\xe6\x4b\xf6\xf3\x20\xec\xbf\x13\xd1\xbb\x61\x27\x92\xff\x8d\x15\x78\x37\xdc\x20\xec\xff\x0c\xab\x5e\x2a\x36\x0f\xf1\x7b\x1b\x29\xff\xf7\x57\xe8\xdd\xf0\x5e\x21\xff\xba\x4f\xf8\x61\x00\xfe\xbf\xd5\xcf\xb2\x80\xff\x1b\x4a\x68\xef\x02\xa8\xcd\x35\x1d\x0b\xf8\xff\x9d\x25\xf2\x5c\x2b\xe0\xff\xc1\x32\xdf\x7b\x0e\x7d\xde\x1f\x67\x39\x26\xe0\x7f\x6f\xe0\x75\x2f\x9a\x33\x85\x8c\x7d\x6f\x0a\xf8\xff\x3e\x40\xef\x6a\x0f\xff\x2b\x03\xf2\x1d\x10\xf0\xef\x7a\x67\x6d\x73\x9e\x87\xff\x3a\xbf\xeb\xf7\xc9\x77\x44\xc0\xff\x64\x80\xff\x9e\xf5\xd7\x16\xe7\x06\xf8\x3f\x2e\xe0\xff\x58\x80\xff\x6b\x3c\xfc\xaf\x0a\xc8\x77\x58\xc0\x7f\x48\x9d\xd1\xab\x1e\xfe\x77\x07\xe4\xdb\x27\xe0\x3f\xb4\xdf\x1e\x75\x78\x0f\xad\x3d\x7a\x56\xc0\xff\x3d\x81\x9a\x9a\xaf\x71\xad\xc2\x02\x9e\xc7\xac\xe1\x63\xa1\x79\xee\x16\xf0\xbf\x34\xe0\x79\x93\xe4\x14\x40\x8b\x05\xfc\x6b\xbe\x31\x00\xff\xbb\x05\xe7\x9f\xed\x01\xf8\xbf\x4a\x78\xfd\x32\x5e\xa1\xf7\x6e\x84\xf5\xd7\x59\x05\xb5\x70\x52\xd4\x1a\x0b\x23\xad\x7f\x57\x00\x74\x34\xa2\xf7\xa3\x76\xbd\xb4\xb0\x7f\xc5\x73\xb4\x32\x75\x3b\x3e\xde\xdb\x15\xed\x5f\x5d\xcc\xbf\xd1\x92\xf2\x7e\x20\x5b\x8f\x5b\x81\x7f\xc5\x35\x7a\xdb\xfb\xac\xe3\xd2\xe3\xca\x93\x39\x75\x87\xb1\xfd\x1b\xb6\x78\x4d\x62\xff\x86\xce\x45\x3d\xa7\x7d\x05\xa0\x2b\x8a\xf2\x57\xe0\xdf\x70\x18\xa0\xdb\xb9\x66\xf2\x43\x80\x7e\xe2\x3a\xae\x09\xae\x3b\xfd\x48\xcf\x67\x00\xba\x0b\xa0\x73\x7d\xf3\x26\x24\x24\x24\x24\x24\x24\x24\x24\x24\x24\x24\xfc\x5f\xf0\x4f\x00\x00\x00\xff\xff\xb4\x90\x9b\x2f\xae\x46\x00\x00"),
		},
		"/style.css": &vfsgen۰CompressedFileInfo{
			name:             "style.css",
			modTime:          time.Date(2019, 12, 9, 19, 6, 33, 569385303, time.UTC),
			uncompressedSize: 3213,

			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x3d\x73\xe3\x36\x10\xad\x85\x5f\x81\xd1\xcd\x35\x0e\x29\x53\xb2\x75\x8e\xa9\x49\x91\x5c\x93\x22\x5d\xd2\x79\x5c\x80\xc4\x4a\x44\x0c\x02\x08\xb0\xb4\xa5\xf3\xf8\xbf\x67\xf0\x41\x91\x94\x2c\x4d\x8a\x54\x12\xb1\x8b\xdd\xb7\x8b\xb7\x0f\x68\xb0\x95\xf4\x9d\x50\x2a\x85\x82\xbc\x01\xb1\x6b\xb0\xa4\xcb\xc5\x72\xbd\xa1\xb7\x37\x74\x49\x6f\x6e\x09\xa5\xf9\x1b\x54\x2f\x02\x73\x84\x3d\xe6\x4e\xfc\x80\x9c\xf1\xbf\x3b\xe7\x3d\x8b\xe2\x6b\xf0\x5c\x79\xcf\x0f\x52\x69\x7e\x08\xf1\x5a\x66\x77\x42\x95\xb4\xd8\x90\x0f\xd2\x32\xa1\xc2\x2a\x17\xce\x48\x76\x28\x69\x25\x75\xfd\xe2\x4d\xcd\x32\x18\xb6\x5a\xc5\xc8\x25\x5d\x41\xbb\x19\x07\x58\x7c\x7b\x80\x36\xc6\x69\x6c\x70\xae\xf4\xde\xfb\x0a\xb5\x2b\x69\xad\x15\x82\xc2\xbc\xd2\xfb\x31\xe2\xbe\x92\x62\xbc\xa8\x5f\xc1\x6e\xa5\x7e\x2b\xe9\xab\x70\xa2\x92\x30\x46\x6e\x2c\x0c\x48\xb6\xac\x15\xf2\x50\xd2\x56\x2b\xed\x0c\xab\x21\x1b\xfe\x8e\x23\x8e\x60\x2f\xa1\x1d\x87\x63\x11\x29\xab\x5f\x76\x56\x77\x8a\xe7\xb5\x96\xda\x96\x14\x2d\x53\xce\x30\x0b\x0a\x7d\x45\xac\xaa\xec\x13\x0a\x94\xf0\x9c\x4a\xb3\x1c\x6c\x5e\x69\x44\xdd\x96\x54\x69\x35\xc9\x17\x0e\x80\x43\xad\x2d\x43\xa1\x55\x49\x3b\xc5\xc1\xfa\xb3\x1b\x72\x5f\xf3\xa2\x5c\x23\x02\x9f\x9c\x58\x46\x1c\x5a\xad\x76\x43\xf5\x6f\xa9\x79\x95\x96\x1c\xac\x87\x59\x6b\x0e\x19\x79\xa9\x78\x46\x1c\x6b\xcd\xff\xd9\x28\xd7\x32\x29\x4f\x39\xf0\x73\xf1\xd5\xa7\x75\x9d\x47\xd7\x99\x53\xf3\xc3\xfa\xeb\xe6\x94\xb3\x85\x5f\x31\xda\x89\x58\xb2\x05\xc9\x50\xbc\x82\x5f\x7d\x05\x8b\xa2\x66\x32\x67\x52\xec\x54\x49\x2b\xe6\x20\xf4\x8c\x7c\x10\x9f\x23\x75\x3e\xb6\x3c\x2f\x16\xab\xb5\xa7\x60\xb0\xc5\xd4\xa8\x4d\x30\xa4\x75\xd1\xee\xc6\x87\xe5\xf0\x20\x21\x9d\x95\xdf\x55\x75\x88\x5a\x65\x44\x28\xd3\x61\x46\xb4\x41\x4f\x01\x93\x11\x07\x12\x6a\xcc\x88\x3f\x1f\x66\x81\x9d\xb7\x51\xa8\x06\xac\xc0\x4b\x9d\xeb\x87\x2d\x99\xae\xce\xec\x30\x80\xe3\xc3\x1e\x43\xa3\xef\x57\x67\x63\xe4\x1e\x81\x4f\xfc\x03\xc7\x02\x99\xb7\xda\xb6\x43\xf5\xfd\x96\x27\x3c\x18\xf8\x65\x1e\x3f\xe7\xcf\xc7\x05\x0b\x0e\x70\xf4\xed\xba\xaa\x15\x38\x8f\xec\xef\x75\x86\x19\x03\xcc\x32\x55\x43\x49\x63\x84\x21\x74\x59\xe6\xad\xfe\x91\x6f\x75\xdd\xb9\x5c\x28\x05\xf6\x2c\xd9\x15\x97\x94\xfe\x8a\x47\x0f\xe8\xdc\xe5\xe2\x99\x53\x6a\x18\xe7\x41\x8e\x8a\x11\xd0\x61\xbf\x15\x6a\x77\x8e\xf2\x82\xbd\x87\x78\xc1\x7c\xc4\x37\xb5\x07\x70\xba\x43\xcf\x89\x92\x2e\xcd\x3e\x8d\x3a\xfd\x2d\xa4\xfb\x0b\xf6\x41\x6f\xb6\x02\x24\x77\x80\xc1\x7d\x40\xbd\xb8\x5b\x7b\x8d\x5d\x3c\xc4\x9f\x6f\xfd\x04\x48\xd8\x81\xe2\x67\xa2\x7b\x54\xa9\x89\xe6\x26\x85\x1b\x73\x38\x09\xd2\x51\xf6\x91\xf5\xaa\x7b\x64\xe9\x3e\x7f\x13\x1c\x9b\x73\x76\x8f\x7a\xea\x57\xef\xe2\xea\x5b\x23\x10\xf2\xa0\x2f\xbe\xfd\xb6\x65\x72\xd8\xe4\x55\x5c\xef\x2c\x38\x17\x20\x5f\x9b\xfb\xc9\x0c\x0e\xe4\x67\x1d\x6a\x6f\x4e\xcd\xae\x1b\xa8\x5f\x2a\xbd\x1f\x13\x98\x71\xa1\xe7\xcf\xff\xb1\x27\x27\x45\xa4\x31\x4c\xa1\x54\xd7\x56\x60\x03\xd5\x12\xf1\x03\xcf\x72\x67\x84\xca\x4f\x06\xe9\xdc\x57\x77\x38\xf5\x0d\x90\x7a\x39\x38\x29\xc4\x01\xb3\x75\x73\x65\xcc\x7c\x3f\x02\x39\x26\x17\x66\xe4\x53\xae\xb7\x5b\x07\x58\xd2\x7c\x65\xf6\x9f\xd4\xd1\x07\x1f\xb0\xc5\x95\xd1\x1d\x74\x31\x6f\xaf\x1b\xc3\xde\xad\x90\x90\x77\x46\x6a\xc6\xc7\x85\x5d\xd1\x86\x13\xb5\xfc\x84\x82\x1f\x84\x03\x32\x21\xdd\x85\x57\x88\xeb\xda\x96\xd9\xc3\xd4\x2a\x85\xc3\x5c\x60\x9c\x04\x84\xd6\x48\x86\x30\x75\xe9\xd1\x3f\x35\x82\x73\x50\xcf\x9f\x5b\x49\x7a\x65\xcd\xd2\x84\x7c\xb9\xbf\xbf\xdf\x90\xd9\x44\xf9\xdd\xc1\x21\xb4\x79\x27\x32\xfa\x3b\xc8\x57\xf0\xc4\xcd\xe8\xfc\x8f\xae\x16\x9c\xd1\x3f\x99\x72\xf3\x8c\xfe\x6a\x05\x93\x21\x22\xcb\x08\x2b\x59\xed\x6f\x38\xff\xcf\x6b\xb6\x1f\xf6\xf7\x14\xb5\xbf\xc1\xd7\xeb\x62\x43\x66\x67\xef\x81\x23\x30\x56\x36\x9e\xfb\x7e\xdf\x95\xa7\x45\xf4\x1c\xe5\x48\x75\x98\xce\x1a\x99\xcc\x7e\xd2\xa4\xef\xce\x2c\x5e\x3c\xc7\x27\xcc\x9d\xe7\x0c\x99\x0d\x83\x40\x57\xd6\xb7\x74\x76\x7b\x33\xbe\xa5\x12\x61\x4f\x14\x61\x75\xef\x37\xd3\x78\x84\xf1\xad\x38\x1b\x3f\x15\x63\xa4\x49\xc9\x49\x13\xbc\xff\xe2\x9f\x0e\xc2\xa1\x1e\x1b\x5f\x14\xc5\xa9\xff\xf0\xc8\x21\x8b\x16\x9c\x63\x3b\xc8\xc8\x02\xac\xd5\xf6\x24\xdb\x72\xb1\xfe\x24\x5f\xbf\x7f\x76\x7b\x13\x2f\xc5\x24\x36\x35\x28\x04\xbb\x49\xd0\x87\x80\x3d\x94\xef\xdf\x8b\x87\xe2\x21\xe4\x0d\xaa\xe8\x6d\x49\x43\x6a\x2d\x25\x33\x0e\xfc\xeb\x36\xfe\xdb\x5c\x6a\x6b\x5a\x0d\x0f\x94\xb8\xe4\xe3\xf1\x8c\x62\x33\x04\x8c\xf7\x81\xd3\x52\x70\xfa\xe5\xf1\xf1\x71\x72\x1c\x7d\x51\x63\xec\x12\xb6\xe1\xb6\x20\xfe\x6e\xf7\x71\x8e\xee\xbe\xe3\xb4\x88\xd7\x5c\x7a\x44\x9c\xf4\x28\x9d\x49\xaf\x43\xf1\xf3\x83\x44\xef\x9f\x8e\x7b\x12\x70\x9f\xa9\xa4\xeb\x08\xfc\xdf\x00\x00\x00\xff\xff\xa7\x92\x3e\xa7\x8d\x0c\x00\x00"),
		},
		"/templates.html": &vfsgen۰CompressedFileInfo{
			name:             "templates.html",
			modTime:          time.Date(2019, 12, 10, 0, 1, 22, 207125614, time.UTC),
			uncompressedSize: 2170,

			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x55\x51\x73\xdb\x36\x0c\x7e\xd7\xaf\x40\xd5\xbb\xd9\x6e\x6b\xb1\xed\x5e\x72\x89\xe8\x3d\xa4\xd9\x6e\x77\xbe\xad\x4b\x9d\x87\x3d\xed\x18\x09\xb6\x78\xa1\x48\x8d\x84\xac\x73\x35\xfd\xf7\x1d\x49\xc9\xf1\xe2\x78\x4f\x06\x81\x8f\xe0\x07\x7c\x02\xdc\xf7\x50\xe2\x56\x6a\x84\xb4\x42\x51\xa2\x4d\x61\x39\x0c\x49\xfe\xe6\xcb\xef\xb7\x9b\x3f\xbf\xde\x41\x45\xb5\x5a\x25\x79\xfc\x01\xc8\x3d\xca\x1b\x00\x79\x8d\x24\xa0\xa8\x84\x75\x48\x3c\x7d\xd8\xfc\xbc\xbc\x4a\x4f\x43\x5a\xd4\xc8\xd3\xbd\xc4\xae\x31\x96\x52\x28\x8c\x26\xd4\xc4\xd3\x4e\x96\x54\xf1\x12\xf7\xb2\xc0\x65\x38\x4c\xf7\x48\x92\xc2\x55\xdf\x43\xb6\xf1\x16\x0c\x03\xfc\x03\x3b\x34\xca\x98\xa7\xb6\xc9\x59\x8c\x47\xac\x92\xfa\x09\x2c\x2a\x9e\x3a\x3a\x28\x74\x15\x22\xa5\x50\x59\xdc\xf2\x94\x09\xe7\x90\x1c\x0b\x91\xac\x70\x2e\x3c\x90\xb3\x89\x7d\xfe\x68\xca\xc3\x98\x47\x58\x92\x85\xcf\xda\xf7\x80\xba\x84\x61\x48\x92\xe4\xa4\x2f\x5b\x63\xc8\xf7\x65\x18\x22\x9e\x1d\x2f\xf8\x43\x4c\x94\xb3\xd8\xa0\xbe\x5f\xbe\x9a\x03\xad\x35\x31\x45\xdf\x03\x61\xdd\x28\x41\x27\x2d\xcf\x7c\x24\x6f\xa0\x50\xc2\x39\x3e\xa2\x43\x1b\xee\xbc\x09\xc3\x90\xb3\x66\xf5\xdf\xbb\x27\xb4\x2e\x10\x57\xa6\x50\xd2\x51\x54\xf4\x7f\xde\x8d\xa7\x55\x92\xbf\x59\x2e\x21\xaf\x3e\xad\xee\xd1\xb5\x8a\x1c\x6c\x8d\x85\xdc\x35\x42\x4f\xc4\xfe\x6e\xd1\x1e\x22\xb1\x3f\xbc\x19\x88\x79\xc0\x2a\x67\xd5\xa7\x15\x2c\x97\xab\x24\xdf\x1a\x5b\x43\x8d\x54\x99\x92\xa7\xbf\xdc\x6d\x52\x90\x25\x4f\x1d\x0a\x5b\x44\x9d\x73\xa9\x9b\x96\x80\x0e\x0d\x1e\xfd\xe3\xc7\x12\x1f\x08\x17\x46\xd3\xc9\xef\xc8\xd3\x1f\x3f\xa6\xb0\x17\xaa\x45\x9e\x9e\x3e\xfe\x4a\xba\xf6\xb1\x96\x34\xa5\x9b\x4e\x81\xc0\x68\x8f\x69\xbe\x4d\x7c\x72\xe6\x09\x07\x09\xc7\x3e\xf4\x3d\x74\x92\x2a\xc8\xd6\xa6\x10\x24\x8d\x76\xa1\x4d\x24\x1e\x47\xd1\xe9\x64\x08\xc8\x46\x23\xb8\x57\x1b\xd3\xe9\x9c\x51\x75\xea\xbb\xc7\x9d\x34\x67\xde\x5b\xd3\x6a\xb2\x87\x97\xee\xaf\xc6\x51\x61\x4a\x7c\xe9\xdf\xc8\x1a\xbf\x1b\x7d\xe6\x5f\x0b\x92\xd4\x9e\xe3\xd7\x46\xef\x5e\x04\x72\x16\xb9\x7a\xcf\x34\x06\xf4\x3c\x07\x7d\x0f\x56\xe8\x1d\xc6\x8f\xe2\xac\xb6\x72\x32\xfd\xc4\x8c\x53\x56\x11\x35\xee\x9a\xb1\xae\xeb\x32\xd3\xa0\x76\x64\x11\xa9\x16\x4d\x66\xec\x8e\xfd\x54\x2b\x41\xdc\xcb\x35\x91\x84\x61\xf8\xa1\x56\x46\x47\xe7\xc4\x10\x86\xe1\x6d\x2d\x1a\x7e\xc5\x5e\x60\xd9\x4b\x58\x7a\xa4\x00\x00\x24\xec\xce\xef\x9d\xbf\x1e\x95\xd0\x4f\x69\xdc\x04\xda\x78\x1e\x68\x9f\x91\x71\x99\x98\x4e\x87\x6f\x55\x1c\x0b\x62\xcf\x15\xf9\xe2\x3c\x2a\x0a\x15\x70\xe7\xc1\x51\xaf\x0b\xd1\x49\xb6\x0b\xe1\x49\xbd\x0b\xe1\x93\x9a\x5f\x0d\x9f\xb4\xe0\x39\x3e\xc9\x19\x94\x1b\xc7\x3f\x78\xa7\x8d\x34\x7e\xaf\x3e\xaa\x5c\xb8\x7b\x5c\x30\x35\x3a\x27\x76\x98\xae\x7e\x33\x60\xe3\xb0\xfb\x05\x73\xb2\x47\x72\x57\x58\xd9\xd0\x2a\x29\x4d\xd1\xd6\xa8\x29\x0b\xf3\xf8\x0d\x15\x16\x64\xec\x7c\xf6\x36\x0e\xee\x6c\x91\x89\xb2\xbc\xdb\xa3\xa6\xb5\x74\xe4\x7b\x3f\x9f\xc5\x51\x9b\x7d\x80\x6d\xab\x0b\x3f\x40\x73\xdc\x2f\xfa\x04\x00\xf7\x59\x63\xd1\x83\xbf\xe0\x56\xb4\x8a\xe6\x8b\x9b\x04\x60\x2f\x2c\x84\xf4\xc0\x3d\x24\x2a\x7b\xf6\x60\x38\xcf\x16\x59\x18\xe0\x0f\xa1\xf2\xd6\x2a\xe0\xa0\xb1\x83\x87\xfb\xf5\xfc\x48\xf5\xe1\x7e\xbd\xb8\x49\xc6\xc4\x1a\xbb\x08\x6b\xad\xca\x1a\x6b\xc8\x14\x46\xc1\x7b\x98\x31\x36\x83\xf7\xc1\x5b\x19\x47\xc1\xe3\x1d\xa8\xbd\x90\x0f\xf7\xbf\xde\x9a\xba\x31\x1a\x35\xcd\xc3\xcb\x0b\x8f\xc8\xfc\x9a\x9f\x79\xce\x9d\xd4\xa5\xe9\x32\x35\xae\x88\xcc\x4f\x44\xe4\xd2\x5a\x75\x93\x0c\x1f\x60\x2b\x94\x43\xcf\xe3\xc8\xeb\xbc\x53\x4f\x78\x28\x4d\xa7\x5f\x69\x95\xdc\xc2\x1c\xf7\xd9\x13\x1e\x80\x73\xee\xb9\x2d\xa0\x0f\x45\x5f\x68\x62\xac\x16\x7d\xa5\x17\x35\x1b\x5b\x18\xe1\xa8\x32\x17\x42\xf1\xfe\x70\xca\x39\x67\x93\xfe\x97\xff\x73\x8e\xff\x74\x7d\xcf\xde\xc1\x5e\xd6\xd7\xe0\x90\x60\x4b\x7c\x67\x7c\x9b\xa8\x6e\x14\x90\xe3\x9f\xc1\x75\xfc\x33\x50\xc7\xaf\x3e\x02\x12\x5c\xc3\x3b\x36\x0c\xc9\xbf\x01\x00\x00\xff\xff\xf4\xa4\x94\xc8\x7a\x08\x00\x00"),
		},
	}
	fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
		fs["/favicon.ico"].(os.FileInfo),
		fs["/style.css"].(os.FileInfo),
		fs["/templates.html"].(os.FileInfo),
	}

	return fs
}()

Assets statically implements the virtual filesystem provided to vfsgen.

Functions

func SelectiveLogger

func SelectiveLogger(ignorePrefix ...string) func(http.Handler) http.Handler

Custom logger middleware that ignores requests to /-/...

func SetContentType

func SetContentType(next http.Handler) http.Handler

SetContentType adds the requested content type to the request context. It uses file extension if one is present, or Accept header.

Types

type GeoAPI

type GeoAPI struct {
	// contains filtered or unexported fields
}

GeoAPI returns location data based on IP address or town name.

func New

func New(bindAddr string, db GeoDB, health bool) *GeoAPI

New creates a new GeoAPI instance.

func (*GeoAPI) Serve

func (sv *GeoAPI) Serve()

func (*GeoAPI) Stop

func (sv *GeoAPI) Stop()

type GeoDB

type GeoDB interface {
	Lookup(net.IP) (geo.Location, error)
	Search(string) ([]geo.Location, error)
}

GeoDB searches for locations based on IP address or search query.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL