Documentation ¶
Overview ¶
Package dummy contains protoc-generated output and implements a test and demo dummy services. It is intended as for transflect testing only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Dummy_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dummy.Dummy", HandlerType: (*DummyServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Say", Handler: _Dummy_Say_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dummy/dummy.proto", }
Dummy_ServiceDesc is the grpc.ServiceDesc for Dummy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_dummy_dummy_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDummyServer ¶
func RegisterDummyServer(s grpc.ServiceRegistrar, srv DummyServer)
Types ¶
type DummyClient ¶
type DummyClient interface {
Say(ctx context.Context, in *SayRequest, opts ...grpc.CallOption) (*SayResponse, error)
}
DummyClient is the client API for Dummy 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 NewDummyClient ¶
func NewDummyClient(cc grpc.ClientConnInterface) DummyClient
type DummyServer ¶
type DummyServer interface { Say(context.Context, *SayRequest) (*SayResponse, error) // contains filtered or unexported methods }
DummyServer is the server API for Dummy service. All implementations must embed UnimplementedDummyServer for forward compatibility
type SayRequest ¶
type SayRequest struct { Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // contains filtered or unexported fields }
func (*SayRequest) Descriptor
deprecated
func (*SayRequest) Descriptor() ([]byte, []int)
Deprecated: Use SayRequest.ProtoReflect.Descriptor instead.
func (*SayRequest) GetWord ¶
func (x *SayRequest) GetWord() string
func (*SayRequest) ProtoMessage ¶
func (*SayRequest) ProtoMessage()
func (*SayRequest) ProtoReflect ¶
func (x *SayRequest) ProtoReflect() protoreflect.Message
func (*SayRequest) Reset ¶
func (x *SayRequest) Reset()
func (*SayRequest) String ¶
func (x *SayRequest) String() string
type SayResponse ¶
type SayResponse struct { DoubleWord string `protobuf:"bytes,1,opt,name=double_word,json=doubleWord,proto3" json:"double_word,omitempty"` // contains filtered or unexported fields }
func (*SayResponse) Descriptor
deprecated
func (*SayResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayResponse.ProtoReflect.Descriptor instead.
func (*SayResponse) GetDoubleWord ¶
func (x *SayResponse) GetDoubleWord() string
func (*SayResponse) ProtoMessage ¶
func (*SayResponse) ProtoMessage()
func (*SayResponse) ProtoReflect ¶
func (x *SayResponse) ProtoReflect() protoreflect.Message
func (*SayResponse) Reset ¶
func (x *SayResponse) Reset()
func (*SayResponse) String ¶
func (x *SayResponse) String() string
type Server ¶
type Server struct {
UnimplementedDummyServer
}
Server implements the server-side of gRPC demo Phone service.
func (*Server) Say ¶
func (*Server) Say(ctx context.Context, req *SayRequest) (*SayResponse, error)
Hello is a demo dummy service.
type UnimplementedDummyServer ¶
type UnimplementedDummyServer struct { }
UnimplementedDummyServer must be embedded to have forward compatible implementations.
func (UnimplementedDummyServer) Say ¶
func (UnimplementedDummyServer) Say(context.Context, *SayRequest) (*SayResponse, error)
type UnsafeDummyServer ¶
type UnsafeDummyServer interface {
// contains filtered or unexported methods
}
UnsafeDummyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DummyServer will result in compilation errors.