Documentation ¶
Overview ¶
Package v1 is a generated protocol buffer package.
It is generated from these files:
app/service/main/location/api/v1/api.proto
It has these top-level messages:
InfoReply InfoReq
Index ¶
- Constants
- Variables
- func RegisterLocationServer(s *grpc.Server, srv LocationServer)
- type InfoReply
- func (*InfoReply) Descriptor() ([]byte, []int)
- func (m *InfoReply) GetAddr() string
- func (m *InfoReply) GetCity() string
- func (m *InfoReply) GetCountry() string
- func (m *InfoReply) GetIsp() string
- func (m *InfoReply) GetLatitude() float64
- func (m *InfoReply) GetLongitude() float64
- func (m *InfoReply) GetProvince() string
- func (m *InfoReply) GetZoneId() int64
- func (m *InfoReply) Marshal() (dAtA []byte, err error)
- func (m *InfoReply) MarshalTo(dAtA []byte) (int, error)
- func (*InfoReply) ProtoMessage()
- func (m *InfoReply) Reset()
- func (m *InfoReply) Size() (n int)
- func (m *InfoReply) String() string
- func (m *InfoReply) Unmarshal(dAtA []byte) error
- type InfoReq
- func (*InfoReq) Descriptor() ([]byte, []int)
- func (m *InfoReq) GetAddr() string
- func (m *InfoReq) Marshal() (dAtA []byte, err error)
- func (m *InfoReq) MarshalTo(dAtA []byte) (int, error)
- func (*InfoReq) ProtoMessage()
- func (m *InfoReq) Reset()
- func (m *InfoReq) Size() (n int)
- func (m *InfoReq) String() string
- func (m *InfoReq) Unmarshal(dAtA []byte) error
- type LocationClient
- type LocationServer
Constants ¶
View Source
const AppID = "location.service"
AppID unique app id for service discovery
Variables ¶
View Source
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterLocationServer ¶
func RegisterLocationServer(s *grpc.Server, srv LocationServer)
Types ¶
type InfoReply ¶
type InfoReply struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` Province string `protobuf:"bytes,3,opt,name=province,proto3" json:"province,omitempty"` City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"` Isp string `protobuf:"bytes,5,opt,name=isp,proto3" json:"isp,omitempty"` Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` ZoneId int64 `protobuf:"varint,8,opt,name=zone_id,json=zoneId,proto3" json:"zoneId,omitempty"` }
func (*InfoReply) Descriptor ¶
func (*InfoReply) GetCountry ¶
func (*InfoReply) GetLatitude ¶
func (*InfoReply) GetLongitude ¶
func (*InfoReply) GetProvince ¶
func (*InfoReply) ProtoMessage ¶
func (*InfoReply) ProtoMessage()
type InfoReq ¶
type InfoReq struct {
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (*InfoReq) Descriptor ¶
func (*InfoReq) ProtoMessage ¶
func (*InfoReq) ProtoMessage()
type LocationClient ¶
type LocationClient interface { // Info get ip info. Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoReply, error) }
func NewClient ¶
func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (LocationClient, error)
NewClient new member grpc client
func NewLocationClient ¶
func NewLocationClient(cc *grpc.ClientConn) LocationClient
Click to show internal directories.
Click to hide internal directories.