Documentation ¶
Index ¶
- Variables
- func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
- type EchoClient
- type EchoServer
- type HelloRequest
- type HelloResponse
- type SubMessage
- func (*SubMessage) Descriptor() ([]byte, []int)deprecated
- func (x *SubMessage) GetSubField() string
- func (x *SubMessage) GetSubRepeat() []int32
- func (*SubMessage) ProtoMessage()
- func (x *SubMessage) ProtoReflect() protoreflect.Message
- func (x *SubMessage) Reset()
- func (x *SubMessage) String() string
- type TestMessage1
- type TestMessage2
- func (*TestMessage2) Descriptor() ([]byte, []int)deprecated
- func (x *TestMessage2) GetField1() string
- func (x *TestMessage2) GetField2() int32
- func (x *TestMessage2) GetField3Sub() *SubMessage
- func (*TestMessage2) ProtoMessage()
- func (x *TestMessage2) ProtoReflect() protoreflect.Message
- func (x *TestMessage2) Reset()
- func (x *TestMessage2) String() string
- type TestMessage3
- func (*TestMessage3) Descriptor() ([]byte, []int)deprecated
- func (x *TestMessage3) GetABool2() bool
- func (x *TestMessage3) GetAInt_3() int32
- func (x *TestMessage3) GetARepeat() []string
- func (x *TestMessage3) GetASubmsgRepeat() []*SubMessage
- func (x *TestMessage3) GetWeird_FieldName_1_() string
- func (*TestMessage3) ProtoMessage()
- func (x *TestMessage3) ProtoReflect() protoreflect.Message
- func (x *TestMessage3) Reset()
- func (x *TestMessage3) String() string
- type TestMessage4
- func (*TestMessage4) Descriptor() ([]byte, []int)deprecated
- func (x *TestMessage4) GetABool() bool
- func (x *TestMessage4) GetABytes() []byte
- func (x *TestMessage4) GetADouble() float64
- func (x *TestMessage4) GetAFixed32() uint32
- func (x *TestMessage4) GetAFixed64() uint64
- func (x *TestMessage4) GetAFloat() float32
- func (x *TestMessage4) GetAInt32() int32
- func (x *TestMessage4) GetAInt64() int64
- func (x *TestMessage4) GetAMap() map[string]bool
- func (x *TestMessage4) GetAMessage() *TestMessage1
- func (x *TestMessage4) GetASfixed32() int32
- func (x *TestMessage4) GetASfixed64() int64
- func (x *TestMessage4) GetASint32() int32
- func (x *TestMessage4) GetASint64() int64
- func (x *TestMessage4) GetAString() string
- func (x *TestMessage4) GetAStringList() []string
- func (x *TestMessage4) GetAUint32() uint32
- func (x *TestMessage4) GetAUint64() uint64
- func (*TestMessage4) ProtoMessage()
- func (x *TestMessage4) ProtoReflect() protoreflect.Message
- func (x *TestMessage4) Reset()
- func (x *TestMessage4) String() string
- type UnimplementedEchoServer
- type UnsafeEchoServer
Constants ¶
This section is empty.
Variables ¶
var Echo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Echo", HandlerType: (*EchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _Echo_Hello_Handler, }, { MethodName: "Hello2", Handler: _Echo_Hello2_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "echo.proto", }
Echo_ServiceDesc is the grpc.ServiceDesc for Echo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_echo_proto protoreflect.FileDescriptor
var File_test_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
Types ¶
type EchoClient ¶
type EchoClient interface { Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) Hello2(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) }
EchoClient is the client API for Echo 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 NewEchoClient ¶
func NewEchoClient(cc grpc.ClientConnInterface) EchoClient
type EchoServer ¶
type EchoServer interface { Hello(context.Context, *HelloRequest) (*HelloResponse, error) Hello2(context.Context, *HelloRequest) (*HelloResponse, error) // contains filtered or unexported methods }
EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility
type HelloRequest ¶
type HelloRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() 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 HelloResponse ¶
type HelloResponse struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetResponse ¶
func (x *HelloResponse) GetResponse() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type SubMessage ¶
type SubMessage struct { SubField string `protobuf:"bytes,1,opt,name=sub_field,json=subField,proto3" json:"sub_field,omitempty"` SubRepeat []int32 `protobuf:"varint,2,rep,packed,name=sub_repeat,json=subRepeat,proto3" json:"sub_repeat,omitempty"` // contains filtered or unexported fields }
func (*SubMessage) Descriptor
deprecated
func (*SubMessage) Descriptor() ([]byte, []int)
Deprecated: Use SubMessage.ProtoReflect.Descriptor instead.
func (*SubMessage) GetSubField ¶
func (x *SubMessage) GetSubField() string
func (*SubMessage) GetSubRepeat ¶
func (x *SubMessage) GetSubRepeat() []int32
func (*SubMessage) ProtoMessage ¶
func (*SubMessage) ProtoMessage()
func (*SubMessage) ProtoReflect ¶
func (x *SubMessage) ProtoReflect() protoreflect.Message
func (*SubMessage) Reset ¶
func (x *SubMessage) Reset()
func (*SubMessage) String ¶
func (x *SubMessage) String() string
type TestMessage1 ¶
type TestMessage1 struct { Field1 string `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"` // contains filtered or unexported fields }
func (*TestMessage1) Descriptor
deprecated
func (*TestMessage1) Descriptor() ([]byte, []int)
Deprecated: Use TestMessage1.ProtoReflect.Descriptor instead.
func (*TestMessage1) GetField1 ¶
func (x *TestMessage1) GetField1() string
func (*TestMessage1) ProtoMessage ¶
func (*TestMessage1) ProtoMessage()
func (*TestMessage1) ProtoReflect ¶
func (x *TestMessage1) ProtoReflect() protoreflect.Message
func (*TestMessage1) Reset ¶
func (x *TestMessage1) Reset()
func (*TestMessage1) String ¶
func (x *TestMessage1) String() string
type TestMessage2 ¶
type TestMessage2 struct { Field1 string `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"` Field2 int32 `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"` Field3Sub *SubMessage `protobuf:"bytes,3,opt,name=field3_sub,json=field3Sub,proto3" json:"field3_sub,omitempty"` // contains filtered or unexported fields }
func (*TestMessage2) Descriptor
deprecated
func (*TestMessage2) Descriptor() ([]byte, []int)
Deprecated: Use TestMessage2.ProtoReflect.Descriptor instead.
func (*TestMessage2) GetField1 ¶
func (x *TestMessage2) GetField1() string
func (*TestMessage2) GetField2 ¶
func (x *TestMessage2) GetField2() int32
func (*TestMessage2) GetField3Sub ¶
func (x *TestMessage2) GetField3Sub() *SubMessage
func (*TestMessage2) ProtoMessage ¶
func (*TestMessage2) ProtoMessage()
func (*TestMessage2) ProtoReflect ¶
func (x *TestMessage2) ProtoReflect() protoreflect.Message
func (*TestMessage2) Reset ¶
func (x *TestMessage2) Reset()
func (*TestMessage2) String ¶
func (x *TestMessage2) String() string
type TestMessage3 ¶
type TestMessage3 struct { Weird_FieldName_1_ string `protobuf:"bytes,1,opt,name=weird_FieldName_1_,json=weirdFieldName1,proto3" json:"weird_FieldName_1_,omitempty"` ABool2 bool `protobuf:"varint,2,opt,name=a_bool2,json=aBool2,proto3" json:"a_bool2,omitempty"` AInt_3 int32 `protobuf:"varint,3,opt,name=a_int_3,json=aInt3,proto3" json:"a_int_3,omitempty"` ARepeat []string `protobuf:"bytes,4,rep,name=a_repeat,json=aRepeat,proto3" json:"a_repeat,omitempty"` ASubmsgRepeat []*SubMessage `protobuf:"bytes,5,rep,name=a_submsg_repeat,json=aSubmsgRepeat,proto3" json:"a_submsg_repeat,omitempty"` // contains filtered or unexported fields }
func (*TestMessage3) Descriptor
deprecated
func (*TestMessage3) Descriptor() ([]byte, []int)
Deprecated: Use TestMessage3.ProtoReflect.Descriptor instead.
func (*TestMessage3) GetABool2 ¶
func (x *TestMessage3) GetABool2() bool
func (*TestMessage3) GetAInt_3 ¶
func (x *TestMessage3) GetAInt_3() int32
func (*TestMessage3) GetARepeat ¶
func (x *TestMessage3) GetARepeat() []string
func (*TestMessage3) GetASubmsgRepeat ¶
func (x *TestMessage3) GetASubmsgRepeat() []*SubMessage
func (*TestMessage3) GetWeird_FieldName_1_ ¶
func (x *TestMessage3) GetWeird_FieldName_1_() string
func (*TestMessage3) ProtoMessage ¶
func (*TestMessage3) ProtoMessage()
func (*TestMessage3) ProtoReflect ¶
func (x *TestMessage3) ProtoReflect() protoreflect.Message
func (*TestMessage3) Reset ¶
func (x *TestMessage3) Reset()
func (*TestMessage3) String ¶
func (x *TestMessage3) String() string
type TestMessage4 ¶
type TestMessage4 struct { ABool bool `protobuf:"varint,1,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` AInt32 int32 `protobuf:"varint,2,opt,name=a_int32,json=aInt32,proto3" json:"a_int32,omitempty"` ASint32 int32 `protobuf:"zigzag32,3,opt,name=a_sint32,json=aSint32,proto3" json:"a_sint32,omitempty"` ASfixed32 int32 `protobuf:"fixed32,4,opt,name=a_sfixed32,json=aSfixed32,proto3" json:"a_sfixed32,omitempty"` AUint32 uint32 `protobuf:"varint,5,opt,name=a_uint32,json=aUint32,proto3" json:"a_uint32,omitempty"` AFixed32 uint32 `protobuf:"fixed32,6,opt,name=a_fixed32,json=aFixed32,proto3" json:"a_fixed32,omitempty"` AInt64 int64 `protobuf:"varint,7,opt,name=a_int64,json=aInt64,proto3" json:"a_int64,omitempty"` ASint64 int64 `protobuf:"zigzag64,8,opt,name=a_sint64,json=aSint64,proto3" json:"a_sint64,omitempty"` ASfixed64 int64 `protobuf:"fixed64,9,opt,name=a_sfixed64,json=aSfixed64,proto3" json:"a_sfixed64,omitempty"` AUint64 uint64 `protobuf:"varint,10,opt,name=a_uint64,json=aUint64,proto3" json:"a_uint64,omitempty"` AFixed64 uint64 `protobuf:"fixed64,11,opt,name=a_fixed64,json=aFixed64,proto3" json:"a_fixed64,omitempty"` AFloat float32 `protobuf:"fixed32,12,opt,name=a_float,json=aFloat,proto3" json:"a_float,omitempty"` ADouble float64 `protobuf:"fixed64,13,opt,name=a_double,json=aDouble,proto3" json:"a_double,omitempty"` AString string `protobuf:"bytes,14,opt,name=a_string,json=aString,proto3" json:"a_string,omitempty"` ABytes []byte `protobuf:"bytes,15,opt,name=a_bytes,json=aBytes,proto3" json:"a_bytes,omitempty"` AStringList []string `protobuf:"bytes,16,rep,name=a_string_list,json=aStringList,proto3" json:"a_string_list,omitempty"` AMessage *TestMessage1 `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` AMap map[string]bool `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TestMessage4) Descriptor
deprecated
func (*TestMessage4) Descriptor() ([]byte, []int)
Deprecated: Use TestMessage4.ProtoReflect.Descriptor instead.
func (*TestMessage4) GetABool ¶
func (x *TestMessage4) GetABool() bool
func (*TestMessage4) GetABytes ¶
func (x *TestMessage4) GetABytes() []byte
func (*TestMessage4) GetADouble ¶
func (x *TestMessage4) GetADouble() float64
func (*TestMessage4) GetAFixed32 ¶
func (x *TestMessage4) GetAFixed32() uint32
func (*TestMessage4) GetAFixed64 ¶
func (x *TestMessage4) GetAFixed64() uint64
func (*TestMessage4) GetAFloat ¶
func (x *TestMessage4) GetAFloat() float32
func (*TestMessage4) GetAInt32 ¶
func (x *TestMessage4) GetAInt32() int32
func (*TestMessage4) GetAInt64 ¶
func (x *TestMessage4) GetAInt64() int64
func (*TestMessage4) GetAMap ¶
func (x *TestMessage4) GetAMap() map[string]bool
func (*TestMessage4) GetAMessage ¶
func (x *TestMessage4) GetAMessage() *TestMessage1
func (*TestMessage4) GetASfixed32 ¶
func (x *TestMessage4) GetASfixed32() int32
func (*TestMessage4) GetASfixed64 ¶
func (x *TestMessage4) GetASfixed64() int64
func (*TestMessage4) GetASint32 ¶
func (x *TestMessage4) GetASint32() int32
func (*TestMessage4) GetASint64 ¶
func (x *TestMessage4) GetASint64() int64
func (*TestMessage4) GetAString ¶
func (x *TestMessage4) GetAString() string
func (*TestMessage4) GetAStringList ¶
func (x *TestMessage4) GetAStringList() []string
func (*TestMessage4) GetAUint32 ¶
func (x *TestMessage4) GetAUint32() uint32
func (*TestMessage4) GetAUint64 ¶
func (x *TestMessage4) GetAUint64() uint64
func (*TestMessage4) ProtoMessage ¶
func (*TestMessage4) ProtoMessage()
func (*TestMessage4) ProtoReflect ¶
func (x *TestMessage4) ProtoReflect() protoreflect.Message
func (*TestMessage4) Reset ¶
func (x *TestMessage4) Reset()
func (*TestMessage4) String ¶
func (x *TestMessage4) String() string
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServer) Hello ¶
func (UnimplementedEchoServer) Hello(context.Context, *HelloRequest) (*HelloResponse, error)
func (UnimplementedEchoServer) Hello2 ¶
func (UnimplementedEchoServer) Hello2(context.Context, *HelloRequest) (*HelloResponse, error)
type UnsafeEchoServer ¶
type UnsafeEchoServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServer will result in compilation errors.