Documentation ¶
Index ¶
- Variables
- func RegisterAddressParserServiceServer(s grpc.ServiceRegistrar, srv AddressParserServiceServer)
- type AddressParserServiceClient
- type AddressParserServiceServer
- type ParserRequest
- type ParserResponse
- func (*ParserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ParserResponse) GetAddress() string
- func (x *ParserResponse) GetCity() string
- func (x *ParserResponse) GetCode() string
- func (x *ParserResponse) GetState() string
- func (*ParserResponse) ProtoMessage()
- func (x *ParserResponse) ProtoReflect() protoreflect.Message
- func (x *ParserResponse) Reset()
- func (x *ParserResponse) String() string
- type UnimplementedAddressParserServiceServer
- type UnsafeAddressParserServiceServer
Constants ¶
This section is empty.
Variables ¶
var AddressParserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "address.AddressParserService", HandlerType: (*AddressParserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SimpleParser", Handler: _AddressParserService_SimpleParser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "mygrpc/proto/simple_parser.proto", }
AddressParserService_ServiceDesc is the grpc.ServiceDesc for AddressParserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_mygrpc_proto_simple_parser_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAddressParserServiceServer ¶
func RegisterAddressParserServiceServer(s grpc.ServiceRegistrar, srv AddressParserServiceServer)
Types ¶
type AddressParserServiceClient ¶
type AddressParserServiceClient interface { // 簡易地址解析 SimpleParser(ctx context.Context, in *ParserRequest, opts ...grpc.CallOption) (*ParserResponse, error) }
AddressParserServiceClient is the client API for AddressParserService 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 NewAddressParserServiceClient ¶
func NewAddressParserServiceClient(cc grpc.ClientConnInterface) AddressParserServiceClient
type AddressParserServiceServer ¶
type AddressParserServiceServer interface { // 簡易地址解析 SimpleParser(context.Context, *ParserRequest) (*ParserResponse, error) // contains filtered or unexported methods }
AddressParserServiceServer is the server API for AddressParserService service. All implementations must embed UnimplementedAddressParserServiceServer for forward compatibility
type ParserRequest ¶
type ParserRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*ParserRequest) Descriptor
deprecated
func (*ParserRequest) Descriptor() ([]byte, []int)
Deprecated: Use ParserRequest.ProtoReflect.Descriptor instead.
func (*ParserRequest) GetAddress ¶
func (x *ParserRequest) GetAddress() string
func (*ParserRequest) ProtoMessage ¶
func (*ParserRequest) ProtoMessage()
func (*ParserRequest) ProtoReflect ¶
func (x *ParserRequest) ProtoReflect() protoreflect.Message
func (*ParserRequest) Reset ¶
func (x *ParserRequest) Reset()
func (*ParserRequest) String ¶
func (x *ParserRequest) String() string
type ParserResponse ¶
type ParserResponse struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*ParserResponse) Descriptor
deprecated
func (*ParserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ParserResponse.ProtoReflect.Descriptor instead.
func (*ParserResponse) GetAddress ¶
func (x *ParserResponse) GetAddress() string
func (*ParserResponse) GetCity ¶
func (x *ParserResponse) GetCity() string
func (*ParserResponse) GetCode ¶
func (x *ParserResponse) GetCode() string
func (*ParserResponse) GetState ¶
func (x *ParserResponse) GetState() string
func (*ParserResponse) ProtoMessage ¶
func (*ParserResponse) ProtoMessage()
func (*ParserResponse) ProtoReflect ¶
func (x *ParserResponse) ProtoReflect() protoreflect.Message
func (*ParserResponse) Reset ¶
func (x *ParserResponse) Reset()
func (*ParserResponse) String ¶
func (x *ParserResponse) String() string
type UnimplementedAddressParserServiceServer ¶
type UnimplementedAddressParserServiceServer struct { }
UnimplementedAddressParserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAddressParserServiceServer) SimpleParser ¶
func (UnimplementedAddressParserServiceServer) SimpleParser(context.Context, *ParserRequest) (*ParserResponse, error)
type UnsafeAddressParserServiceServer ¶
type UnsafeAddressParserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAddressParserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AddressParserServiceServer will result in compilation errors.