Documentation
¶
Index ¶
- Variables
- func NewIpEndpoints() []*api.Endpoint
- func RegisterIpHandler(s server.Server, hdlr IpHandler, opts ...server.HandlerOption) error
- type IpHandler
- type IpService
- type LookupRequest
- type LookupResponse
- func (*LookupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LookupResponse) GetAsn() int32
- func (x *LookupResponse) GetCity() string
- func (x *LookupResponse) GetContinent() string
- func (x *LookupResponse) GetCountry() string
- func (x *LookupResponse) GetIp() string
- func (x *LookupResponse) GetLatitude() float64
- func (x *LookupResponse) GetLongitude() float64
- func (x *LookupResponse) GetTimezone() string
- func (*LookupResponse) ProtoMessage()
- func (x *LookupResponse) ProtoReflect() protoreflect.Message
- func (x *LookupResponse) Reset()
- func (x *LookupResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_ip_proto protoreflect.FileDescriptor
Functions ¶
func NewIpEndpoints ¶
func RegisterIpHandler ¶
Types ¶
type IpHandler ¶
type IpHandler interface {
Lookup(context.Context, *LookupRequest, *LookupResponse) error
}
type IpService ¶
type IpService interface {
Lookup(ctx context.Context, in *LookupRequest, opts ...client.CallOption) (*LookupResponse, error)
}
type LookupRequest ¶
type LookupRequest struct { // IP to lookup Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
Lookup the geolocation information for an IP address
func (*LookupRequest) Descriptor
deprecated
func (*LookupRequest) Descriptor() ([]byte, []int)
Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
func (*LookupRequest) GetIp ¶
func (x *LookupRequest) GetIp() string
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) ProtoReflect ¶
func (x *LookupRequest) ProtoReflect() protoreflect.Message
func (*LookupRequest) Reset ¶
func (x *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (x *LookupRequest) String() string
type LookupResponse ¶
type LookupResponse struct { // IP of the query Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Autonomous system number Asn int32 `protobuf:"varint,2,opt,name=asn,proto3" json:"asn,omitempty"` // Name of the city City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"` // Name of the country Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` // Name of the continent Continent string `protobuf:"bytes,5,opt,name=continent,proto3" json:"continent,omitempty"` // Latitude e.g 52.523219 Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` // Longitude e.g 13.428555 Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` // Timezone e.g Europe/Rome Timezone string `protobuf:"bytes,8,opt,name=timezone,proto3" json:"timezone,omitempty"` // contains filtered or unexported fields }
func (*LookupResponse) Descriptor
deprecated
func (*LookupResponse) Descriptor() ([]byte, []int)
Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.
func (*LookupResponse) GetAsn ¶
func (x *LookupResponse) GetAsn() int32
func (*LookupResponse) GetCity ¶
func (x *LookupResponse) GetCity() string
func (*LookupResponse) GetContinent ¶
func (x *LookupResponse) GetContinent() string
func (*LookupResponse) GetCountry ¶
func (x *LookupResponse) GetCountry() string
func (*LookupResponse) GetIp ¶
func (x *LookupResponse) GetIp() string
func (*LookupResponse) GetLatitude ¶
func (x *LookupResponse) GetLatitude() float64
func (*LookupResponse) GetLongitude ¶
func (x *LookupResponse) GetLongitude() float64
func (*LookupResponse) GetTimezone ¶
func (x *LookupResponse) GetTimezone() string
func (*LookupResponse) ProtoMessage ¶
func (*LookupResponse) ProtoMessage()
func (*LookupResponse) ProtoReflect ¶
func (x *LookupResponse) ProtoReflect() protoreflect.Message
func (*LookupResponse) Reset ¶
func (x *LookupResponse) Reset()
func (*LookupResponse) String ¶
func (x *LookupResponse) String() string
Click to show internal directories.
Click to hide internal directories.