Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGripmockServer(s grpc.ServiceRegistrar, srv GripmockServer)
- type GripmockClient
- type GripmockServer
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)deprecated
- func (x *Reply) GetReply1() *Reply1
- func (x *Reply) GetReply2() *Reply2
- func (m *Reply) GetReplyType() isReply_ReplyType
- func (*Reply) ProtoMessage()
- func (x *Reply) ProtoReflect() protoreflect.Message
- func (x *Reply) Reset()
- func (x *Reply) String() string
- type Reply1
- type Reply2
- type Reply_Reply1
- type Reply_Reply2
- type Request
- type UnimplementedGripmockServer
- type UnsafeGripmockServer
Constants ¶
const (
Gripmock_SayHello_FullMethodName = "/oneof.Gripmock/SayHello"
)
Variables ¶
var File_oneof_proto protoreflect.FileDescriptor
var Gripmock_ServiceDesc = grpc.ServiceDesc{ ServiceName: "oneof.Gripmock", HandlerType: (*GripmockServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Gripmock_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "oneof.proto", }
Gripmock_ServiceDesc is the grpc.ServiceDesc for Gripmock service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGripmockServer ¶
func RegisterGripmockServer(s grpc.ServiceRegistrar, srv GripmockServer)
Types ¶
type GripmockClient ¶
type GripmockClient interface { // simple unary method SayHello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) }
GripmockClient is the client API for Gripmock 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 NewGripmockClient ¶
func NewGripmockClient(cc grpc.ClientConnInterface) GripmockClient
type GripmockServer ¶
type GripmockServer interface { // simple unary method SayHello(context.Context, *Request) (*Reply, error) // contains filtered or unexported methods }
GripmockServer is the server API for Gripmock service. All implementations must embed UnimplementedGripmockServer for forward compatibility
type Reply ¶
type Reply struct { // Types that are assignable to ReplyType: // // *Reply_Reply1 // *Reply_Reply2 ReplyType isReply_ReplyType `protobuf_oneof:"replyType"` // contains filtered or unexported fields }
func (*Reply) Descriptor
deprecated
func (*Reply) GetReplyType ¶
func (m *Reply) GetReplyType() isReply_ReplyType
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type Reply1 ¶
type Reply1 struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` ReturnCode int32 `protobuf:"varint,2,opt,name=return_code,json=returnCode,proto3" json:"return_code,omitempty"` // contains filtered or unexported fields }
usual response type
func (*Reply1) Descriptor
deprecated
func (*Reply1) GetMessage ¶
func (*Reply1) GetReturnCode ¶
func (*Reply1) ProtoMessage ¶
func (*Reply1) ProtoMessage()
func (*Reply1) ProtoReflect ¶
func (x *Reply1) ProtoReflect() protoreflect.Message
type Reply2 ¶
type Reply2 struct { Other int32 `protobuf:"varint,1,opt,name=other,proto3" json:"other,omitempty"` // contains filtered or unexported fields }
other response type
func (*Reply2) Descriptor
deprecated
func (*Reply2) ProtoMessage ¶
func (*Reply2) ProtoMessage()
func (*Reply2) ProtoReflect ¶
func (x *Reply2) ProtoReflect() protoreflect.Message
type Reply_Reply1 ¶
type Reply_Reply1 struct {
Reply1 *Reply1 `protobuf:"bytes,1,opt,name=reply1,proto3,oneof"`
}
type Reply_Reply2 ¶
type Reply_Reply2 struct {
Reply2 *Reply2 `protobuf:"bytes,2,opt,name=reply2,proto3,oneof"`
}
type Request ¶
type Request struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type UnimplementedGripmockServer ¶
type UnimplementedGripmockServer struct { }
UnimplementedGripmockServer must be embedded to have forward compatible implementations.
type UnsafeGripmockServer ¶
type UnsafeGripmockServer interface {
// contains filtered or unexported methods
}
UnsafeGripmockServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GripmockServer will result in compilation errors.