proto

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpcapi_location_proto protoreflect.FileDescriptor
View Source
var Location_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Location",
	HandlerType: (*LocationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLocation",
			Handler:    _Location_GetLocation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpcapi_location.proto",
}

Location_ServiceDesc is the grpc.ServiceDesc for Location service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLocationServer

func RegisterLocationServer(s grpc.ServiceRegistrar, srv LocationServer)

Types

type LocationClient

type LocationClient interface {
	// 获取客户端地理位置信息
	GetLocation(ctx context.Context, in *LocationRequest, opts ...grpc.CallOption) (*LocationResponse, error)
}

LocationClient is the client API for Location service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewLocationClient

func NewLocationClient(cc grpc.ClientConnInterface) LocationClient

type LocationRequest

type LocationRequest struct {
	ClientIp string `protobuf:"bytes,1,opt,name=client_ip,proto3" json:"client_ip,omitempty"`
	// contains filtered or unexported fields
}

func (*LocationRequest) Descriptor deprecated

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

Deprecated: Use LocationRequest.ProtoReflect.Descriptor instead.

func (*LocationRequest) GetClientIp

func (x *LocationRequest) GetClientIp() string

func (*LocationRequest) ProtoMessage

func (*LocationRequest) ProtoMessage()

func (*LocationRequest) ProtoReflect

func (x *LocationRequest) ProtoReflect() protoreflect.Message

func (*LocationRequest) Reset

func (x *LocationRequest) Reset()

func (*LocationRequest) String

func (x *LocationRequest) String() string

type LocationResponse

type LocationResponse struct {
	Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"`
	Zone   string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"`
	Campus string `protobuf:"bytes,3,opt,name=campus,proto3" json:"campus,omitempty"`
	// contains filtered or unexported fields
}

func (*LocationResponse) Descriptor deprecated

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

Deprecated: Use LocationResponse.ProtoReflect.Descriptor instead.

func (*LocationResponse) GetCampus

func (x *LocationResponse) GetCampus() string

func (*LocationResponse) GetRegion

func (x *LocationResponse) GetRegion() string

func (*LocationResponse) GetZone

func (x *LocationResponse) GetZone() string

func (*LocationResponse) ProtoMessage

func (*LocationResponse) ProtoMessage()

func (*LocationResponse) ProtoReflect

func (x *LocationResponse) ProtoReflect() protoreflect.Message

func (*LocationResponse) Reset

func (x *LocationResponse) Reset()

func (*LocationResponse) String

func (x *LocationResponse) String() string

type LocationServer

type LocationServer interface {
	// 获取客户端地理位置信息
	GetLocation(context.Context, *LocationRequest) (*LocationResponse, error)
	// contains filtered or unexported methods
}

LocationServer is the server API for Location service. All implementations must embed UnimplementedLocationServer for forward compatibility

type UnimplementedLocationServer

type UnimplementedLocationServer struct {
}

UnimplementedLocationServer must be embedded to have forward compatible implementations.

func (UnimplementedLocationServer) GetLocation

type UnsafeLocationServer

type UnsafeLocationServer interface {
	// contains filtered or unexported methods
}

UnsafeLocationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LocationServer will result in compilation errors.

Jump to

Keyboard shortcuts

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