Documentation ¶
Index ¶
- func NewClient(ctx context.Context, options *GeoIPOptions) (db *geoip2.Reader, err error)
- type Client
- func (c Client) City(ip net.IP) (string, error)
- func (c Client) GeoCity(ip net.IP) (*geoip2.City, error)
- func (c Client) Marshal() ([]byte, error)
- func (c Client) MarshalJSON() ([]byte, error)
- func (c *Client) Merge(src proto.Message)
- func (c *Client) ProtoMessage()
- func (c *Client) Reset()
- func (c Client) String() string
- func (c *Client) Unmarshal(data []byte) (err error)
- func (c *Client) UnmarshalJSON(data []byte) (err error)
- type CustomGeoOptions
- func (*CustomGeoOptions) Descriptor() ([]byte, []int)
- func (m *CustomGeoOptions) GetName() string
- func (*CustomGeoOptions) ProtoMessage()
- func (m *CustomGeoOptions) Reset()
- func (m *CustomGeoOptions) String() string
- func (m *CustomGeoOptions) XXX_DiscardUnknown()
- func (m *CustomGeoOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CustomGeoOptions) XXX_Merge(src proto.Message)
- func (m *CustomGeoOptions) XXX_Size() int
- func (m *CustomGeoOptions) XXX_Unmarshal(b []byte) error
- type Duration
- type GeoIPOptions
- func (*GeoIPOptions) Descriptor() ([]byte, []int)
- func (m *GeoIPOptions) GetCustom() []*CustomGeoOptions
- func (m *GeoIPOptions) GetPath() string
- func (*GeoIPOptions) ProtoMessage()
- func (m *GeoIPOptions) Reset()
- func (m *GeoIPOptions) String() string
- func (m *GeoIPOptions) XXX_DiscardUnknown()
- func (m *GeoIPOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GeoIPOptions) XXX_Merge(src proto.Message)
- func (m *GeoIPOptions) XXX_Size() int
- func (m *GeoIPOptions) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) MarshalJSON ¶
func (*Client) UnmarshalJSON ¶
type CustomGeoOptions ¶
type CustomGeoOptions struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Subnets github_com_MicroOps_cn_fuck_sets.IPNets `protobuf:"bytes,2,opt,name=subnets,proto3,customtype=github.com/MicroOps-cn/fuck/sets.IPNets" json:"subnets"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CustomGeoOptions) Descriptor ¶
func (*CustomGeoOptions) Descriptor() ([]byte, []int)
func (*CustomGeoOptions) GetName ¶
func (m *CustomGeoOptions) GetName() string
func (*CustomGeoOptions) ProtoMessage ¶
func (*CustomGeoOptions) ProtoMessage()
func (*CustomGeoOptions) Reset ¶
func (m *CustomGeoOptions) Reset()
func (*CustomGeoOptions) String ¶
func (m *CustomGeoOptions) String() string
func (*CustomGeoOptions) XXX_DiscardUnknown ¶
func (m *CustomGeoOptions) XXX_DiscardUnknown()
func (*CustomGeoOptions) XXX_Marshal ¶
func (m *CustomGeoOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CustomGeoOptions) XXX_Merge ¶
func (m *CustomGeoOptions) XXX_Merge(src proto.Message)
func (*CustomGeoOptions) XXX_Size ¶
func (m *CustomGeoOptions) XXX_Size() int
func (*CustomGeoOptions) XXX_Unmarshal ¶
func (m *CustomGeoOptions) XXX_Unmarshal(b []byte) error
type GeoIPOptions ¶
type GeoIPOptions struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Custom []*CustomGeoOptions `protobuf:"bytes,2,rep,name=custom,proto3" json:"custom,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewGeoIPOptions ¶
func NewGeoIPOptions() *GeoIPOptions
func (*GeoIPOptions) Descriptor ¶
func (*GeoIPOptions) Descriptor() ([]byte, []int)
func (*GeoIPOptions) GetCustom ¶
func (m *GeoIPOptions) GetCustom() []*CustomGeoOptions
func (*GeoIPOptions) GetPath ¶
func (m *GeoIPOptions) GetPath() string
func (*GeoIPOptions) ProtoMessage ¶
func (*GeoIPOptions) ProtoMessage()
func (*GeoIPOptions) Reset ¶
func (m *GeoIPOptions) Reset()
func (*GeoIPOptions) String ¶
func (m *GeoIPOptions) String() string
func (*GeoIPOptions) XXX_DiscardUnknown ¶
func (m *GeoIPOptions) XXX_DiscardUnknown()
func (*GeoIPOptions) XXX_Marshal ¶
func (m *GeoIPOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GeoIPOptions) XXX_Merge ¶
func (m *GeoIPOptions) XXX_Merge(src proto.Message)
func (*GeoIPOptions) XXX_Size ¶
func (m *GeoIPOptions) XXX_Size() int
func (*GeoIPOptions) XXX_Unmarshal ¶
func (m *GeoIPOptions) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.