Documentation ¶
Index ¶
- Variables
- func RegisterCellphoneServiceServer(s grpc.ServiceRegistrar, srv CellphoneServiceServer)
- type Cellphone
- type CellphoneServiceClient
- type CellphoneServiceServer
- type GetRequest
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetCode() uint64
- func (x *GetResponse) GetData() *Cellphone
- func (x *GetResponse) GetMsg() string
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- type UnimplementedCellphoneServiceServer
- type UnsafeCellphoneServiceServer
Constants ¶
This section is empty.
Variables ¶
var CellphoneService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cellphone.CellphoneService", HandlerType: (*CellphoneServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _CellphoneService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cellphone.proto", }
CellphoneService_ServiceDesc is the grpc.ServiceDesc for CellphoneService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cellphone_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCellphoneServiceServer ¶
func RegisterCellphoneServiceServer(s grpc.ServiceRegistrar, srv CellphoneServiceServer)
Types ¶
type Cellphone ¶
type Cellphone struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Cellphone uint64 `protobuf:"varint,2,opt,name=cellphone,proto3" json:"cellphone,omitempty"` // contains filtered or unexported fields }
func (*Cellphone) Descriptor
deprecated
func (*Cellphone) GetCellphone ¶
func (*Cellphone) ProtoMessage ¶
func (*Cellphone) ProtoMessage()
func (*Cellphone) ProtoReflect ¶
func (x *Cellphone) ProtoReflect() protoreflect.Message
type CellphoneServiceClient ¶
type CellphoneServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
CellphoneServiceClient is the client API for CellphoneService 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 NewCellphoneServiceClient ¶
func NewCellphoneServiceClient(cc grpc.ClientConnInterface) CellphoneServiceClient
type CellphoneServiceServer ¶
type CellphoneServiceServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) // contains filtered or unexported methods }
CellphoneServiceServer is the server API for CellphoneService service. All implementations must embed UnimplementedCellphoneServiceServer for forward compatibility
type GetRequest ¶
type GetRequest struct { Cellphone uint64 `protobuf:"varint,1,opt,name=cellphone,proto3" json:"cellphone,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetCellphone ¶
func (x *GetRequest) GetCellphone() uint64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Code uint64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // for error Data *Cellphone `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetCode ¶
func (x *GetResponse) GetCode() uint64
func (*GetResponse) GetData ¶
func (x *GetResponse) GetData() *Cellphone
func (*GetResponse) GetMsg ¶
func (x *GetResponse) GetMsg() string
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type UnimplementedCellphoneServiceServer ¶
type UnimplementedCellphoneServiceServer struct { }
UnimplementedCellphoneServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCellphoneServiceServer) Get ¶
func (UnimplementedCellphoneServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
type UnsafeCellphoneServiceServer ¶
type UnsafeCellphoneServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCellphoneServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CellphoneServiceServer will result in compilation errors.