Documentation ¶
Index ¶
Constants ¶
View Source
const (
AppName = "ip2region"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPInfo ¶
type IPInfo struct { CityID int64 `bson:"city_id" json:"city_id"` Country string `bson:"country" json:"country"` Region string `bson:"region" json:"region"` Province string `bson:"province" json:"province"` City string `bson:"city" json:"city"` ISP string `bson:"isp" json:"isp"` }
IPInfo todo
type Service ¶
type Service interface { UpdateDBFile(*UpdateDBFileRequest) error LookupIP(ip string) (*IPInfo, error) }
Service todo
type UpdateDBFileRequest ¶
UpdateDBFileRequest 上传文件请求
func NewUploadFileRequestFromHTTP ¶
func NewUploadFileRequestFromHTTP(r *http.Request) (*UpdateDBFileRequest, error)
NewUploadFileRequestFromHTTP todo
func (*UpdateDBFileRequest) ReadCloser ¶
func (req *UpdateDBFileRequest) ReadCloser() io.ReadCloser
ReadCloser todo
func (*UpdateDBFileRequest) Validate ¶
func (req *UpdateDBFileRequest) Validate() error
Validate 校验参数
Click to show internal directories.
Click to hide internal directories.