Documentation ¶
Index ¶
- Variables
- func NewHelloYeahEndpoints() []*api.Endpoint
- func RegisterHelloYeahHandler(s server.Server, hdlr HelloYeahHandler, opts ...server.HandlerOption) error
- type HelloReply
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetAge() int32
- func (x *HelloRequest) GetName() string
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type HelloYeahHandler
- type HelloYeahService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_hello_proto protoreflect.FileDescriptor
Functions ¶
func NewHelloYeahEndpoints ¶
func RegisterHelloYeahHandler ¶
func RegisterHelloYeahHandler(s server.Server, hdlr HelloYeahHandler, opts ...server.HandlerOption) error
Types ¶
type HelloReply ¶
type HelloReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // 第一个参数类型是string MsgName string `protobuf:"bytes,2,opt,name=MsgName,proto3" json:"MsgName,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMsg ¶
func (x *HelloReply) GetMsg() string
func (*HelloReply) GetMsgName ¶
func (x *HelloReply) GetMsgName() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` // contains filtered or unexported fields }
对于消息的定义 在nodejs里面,消息所定义的参数是存在一个数组里面的 所以定义的时候,需要给出参数的位置是比较科学的 注意:目前只针对于nodejs是这样存参数的,至于其他平台语言,不一定是这样的
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetAge ¶
func (x *HelloRequest) GetAge() int32
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloYeahHandler ¶
type HelloYeahHandler interface {
SayHello(context.Context, *HelloRequest, *HelloReply) error
}
type HelloYeahService ¶
type HelloYeahService interface {
SayHello(ctx context.Context, in *HelloRequest, opts ...client.CallOption) (*HelloReply, error)
}
func NewHelloYeahService ¶
func NewHelloYeahService(name string, c client.Client) HelloYeahService
Click to show internal directories.
Click to hide internal directories.