go-libGeoIP

GO Lib GeoIP API for Maxmind

  • 所有者: nranchev/go-libGeoIP
  • 平台:
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

h2. General Description

p{width:500px}. This is the Go implementation of the "Maxmind":http://www.maxmind.com/app/ip-location GeoIP API. It is incomplete and work in progress the initial goal is support only two of the database types - the City Lite and Country Lite. The only supported method is loading the full db on startup into memory (memory cache).

h3. Supported Access Methods

  • In Memory (Load(string))

h3. Supported Database Formats

  • Country Edition (dbType=1)
  • City Edition REV 0 (dbType=6)
  • City Edition REV 1 (dbType=2)

h3. Supported Lookups

  • By IP Address (GetLocationByIP(string))
  • By IP Number (GetLocationByIPNum(uint32))

h3. Supported Responses

  • CountryCode string (available in all databases)
  • CountryName string (available in all databases)
  • City string
  • Region string
  • PostalCode string
  • Latitude float32
  • Longitude float32

h3. To Do

  • Implement better error handling (report the error on load and lookups)
  • Better returns, country edition has only code and name (perhaps use interfaces)
  • Add test cases and benchmarking
  • Add support for more database formats

h3. Build

make (See Makefile for more details)

h3. Example

./example DBFILE IPADDRESS (i.e. ./example GeoIP.dat 1.1.1.1)

h3. Usage

Please see example.go for a complete example of how to use this library.

主要指標

概覽
名稱與所有者nranchev/go-libGeoIP
主編程語言Go
編程語言Go (語言數: 1)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2010-10-25 06:51:27
推送於2017-06-29 07:38:51
最后一次提交2017-06-29 00:38:46
發布數0
用户参与
星數91
關注者數11
派生數32
提交數18
已啟用問題?
問題數3
打開的問題數3
拉請求數6
打開的拉請求數1
關閉的拉請求數4
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?