Documentation ¶
Index ¶
- Variables
- func RegisterMyServiceServer(s *grpc.Server, srv MyServiceServer)
- type MyServiceClient
- type MyServiceServer
- type MyService_PingStreamClient
- type MyService_PingStreamServer
- type PingRequest
- type PingRequestValidationError
- func (e PingRequestValidationError) Cause() error
- func (e PingRequestValidationError) Error() string
- func (e PingRequestValidationError) ErrorName() string
- func (e PingRequestValidationError) Field() string
- func (e PingRequestValidationError) Key() bool
- func (e PingRequestValidationError) Reason() string
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetId() int64
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- func (m *PingResponse) Validate() error
- type PingResponseValidationError
- func (e PingResponseValidationError) Cause() error
- func (e PingResponseValidationError) Error() string
- func (e PingResponseValidationError) ErrorName() string
- func (e PingResponseValidationError) Field() string
- func (e PingResponseValidationError) Key() bool
- func (e PingResponseValidationError) Reason() string
- type UnimplementedMyServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_test_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMyServiceServer ¶
func RegisterMyServiceServer(s *grpc.Server, srv MyServiceServer)
Types ¶
type MyServiceClient ¶
type MyServiceClient interface { Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) PingStream(ctx context.Context, opts ...grpc.CallOption) (MyService_PingStreamClient, error) }
MyServiceClient is the client API for MyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMyServiceClient ¶
func NewMyServiceClient(cc grpc.ClientConnInterface) MyServiceClient
type MyServiceServer ¶
type MyServiceServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) PingStream(MyService_PingStreamServer) error }
MyServiceServer is the server API for MyService service.
type MyService_PingStreamClient ¶
type MyService_PingStreamClient interface { Send(*PingRequest) error Recv() (*PingResponse, error) grpc.ClientStream }
type MyService_PingStreamServer ¶
type MyService_PingStreamServer interface { Send(*PingResponse) error Recv() (*PingRequest, error) grpc.ServerStream }
type PingRequest ¶
type PingRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetId ¶
func (x *PingRequest) GetId() int64
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
func (*PingRequest) Validate ¶
func (m *PingRequest) Validate() error
Validate checks the field values on PingRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type PingRequestValidationError ¶
type PingRequestValidationError struct {
// contains filtered or unexported fields
}
PingRequestValidationError is the validation error returned by PingRequest.Validate if the designated constraints aren't met.
func (PingRequestValidationError) Cause ¶
func (e PingRequestValidationError) Cause() error
Cause function returns cause value.
func (PingRequestValidationError) Error ¶
func (e PingRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PingRequestValidationError) ErrorName ¶
func (e PingRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PingRequestValidationError) Field ¶
func (e PingRequestValidationError) Field() string
Field function returns field value.
func (PingRequestValidationError) Key ¶
func (e PingRequestValidationError) Key() bool
Key function returns key value.
func (PingRequestValidationError) Reason ¶
func (e PingRequestValidationError) Reason() string
Reason function returns reason value.
type PingResponse ¶
type PingResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetId ¶
func (x *PingResponse) GetId() int64
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
func (*PingResponse) Validate ¶
func (m *PingResponse) Validate() error
Validate checks the field values on PingResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type PingResponseValidationError ¶
type PingResponseValidationError struct {
// contains filtered or unexported fields
}
PingResponseValidationError is the validation error returned by PingResponse.Validate if the designated constraints aren't met.
func (PingResponseValidationError) Cause ¶
func (e PingResponseValidationError) Cause() error
Cause function returns cause value.
func (PingResponseValidationError) Error ¶
func (e PingResponseValidationError) Error() string
Error satisfies the builtin error interface
func (PingResponseValidationError) ErrorName ¶
func (e PingResponseValidationError) ErrorName() string
ErrorName returns error name.
func (PingResponseValidationError) Field ¶
func (e PingResponseValidationError) Field() string
Field function returns field value.
func (PingResponseValidationError) Key ¶
func (e PingResponseValidationError) Key() bool
Key function returns key value.
func (PingResponseValidationError) Reason ¶
func (e PingResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedMyServiceServer ¶
type UnimplementedMyServiceServer struct { }
UnimplementedMyServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMyServiceServer) Ping ¶
func (*UnimplementedMyServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (*UnimplementedMyServiceServer) PingStream ¶
func (*UnimplementedMyServiceServer) PingStream(MyService_PingStreamServer) error