api

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

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

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) Descriptor() ([]byte, []int)

func (*InfoReply) GetAddr

func (m *InfoReply) GetAddr() string

func (*InfoReply) GetCity

func (m *InfoReply) GetCity() string

func (*InfoReply) GetCountry

func (m *InfoReply) GetCountry() string

func (*InfoReply) GetIsp

func (m *InfoReply) GetIsp() string

func (*InfoReply) GetLatitude

func (m *InfoReply) GetLatitude() float64

func (*InfoReply) GetLongitude

func (m *InfoReply) GetLongitude() float64

func (*InfoReply) GetProvince

func (m *InfoReply) GetProvince() string

func (*InfoReply) GetZoneId

func (m *InfoReply) GetZoneId() int64

func (*InfoReply) Marshal

func (m *InfoReply) Marshal() (dAtA []byte, err error)

func (*InfoReply) MarshalTo

func (m *InfoReply) MarshalTo(dAtA []byte) (int, error)

func (*InfoReply) ProtoMessage

func (*InfoReply) ProtoMessage()

func (*InfoReply) Reset

func (m *InfoReply) Reset()

func (*InfoReply) Size

func (m *InfoReply) Size() (n int)

func (*InfoReply) String

func (m *InfoReply) String() string

func (*InfoReply) Unmarshal

func (m *InfoReply) Unmarshal(dAtA []byte) error

type InfoReq

type InfoReq struct {
	Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}

func (*InfoReq) Descriptor

func (*InfoReq) Descriptor() ([]byte, []int)

func (*InfoReq) GetAddr

func (m *InfoReq) GetAddr() string

func (*InfoReq) Marshal

func (m *InfoReq) Marshal() (dAtA []byte, err error)

func (*InfoReq) MarshalTo

func (m *InfoReq) MarshalTo(dAtA []byte) (int, error)

func (*InfoReq) ProtoMessage

func (*InfoReq) ProtoMessage()

func (*InfoReq) Reset

func (m *InfoReq) Reset()

func (*InfoReq) Size

func (m *InfoReq) Size() (n int)

func (*InfoReq) String

func (m *InfoReq) String() string

func (*InfoReq) Unmarshal

func (m *InfoReq) Unmarshal(dAtA []byte) error

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

type LocationServer

type LocationServer interface {
	// Info get ip info.
	Info(context.Context, *InfoReq) (*InfoReply, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL