Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCalcServer(s grpc.ServiceRegistrar, srv CalcServer)
- type CalcClient
- type CalcServer
- type DivideDivByZeroError
- func (*DivideDivByZeroError) Descriptor() ([]byte, []int)deprecated
- func (x *DivideDivByZeroError) GetMessage_() string
- func (*DivideDivByZeroError) ProtoMessage()
- func (x *DivideDivByZeroError) ProtoReflect() protoreflect.Message
- func (x *DivideDivByZeroError) Reset()
- func (x *DivideDivByZeroError) String() string
- type DivideRequest
- func (*DivideRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DivideRequest) GetDividend() int32
- func (x *DivideRequest) GetDivisor() int32
- func (*DivideRequest) ProtoMessage()
- func (x *DivideRequest) ProtoReflect() protoreflect.Message
- func (x *DivideRequest) Reset()
- func (x *DivideRequest) String() string
- type DivideResponse
- func (*DivideResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DivideResponse) GetQuotient() int32
- func (x *DivideResponse) GetReminder() int32
- func (*DivideResponse) ProtoMessage()
- func (x *DivideResponse) ProtoReflect() protoreflect.Message
- func (x *DivideResponse) Reset()
- func (x *DivideResponse) String() string
- type UnimplementedCalcServer
- type UnsafeCalcServer
Constants ¶
const (
Calc_Divide_FullMethodName = "/calc.Calc/Divide"
)
Variables ¶
var Calc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "calc.Calc", HandlerType: (*CalcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Divide", Handler: _Calc_Divide_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "goagen_error_calc.proto", }
Calc_ServiceDesc is the grpc.ServiceDesc for Calc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_goagen_error_calc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCalcServer ¶
func RegisterCalcServer(s grpc.ServiceRegistrar, srv CalcServer)
Types ¶
type CalcClient ¶
type CalcClient interface { // Divide implements divide. Divide(ctx context.Context, in *DivideRequest, opts ...grpc.CallOption) (*DivideResponse, error) }
CalcClient is the client API for Calc 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 NewCalcClient ¶
func NewCalcClient(cc grpc.ClientConnInterface) CalcClient
type CalcServer ¶
type CalcServer interface { // Divide implements divide. Divide(context.Context, *DivideRequest) (*DivideResponse, error) // contains filtered or unexported methods }
CalcServer is the server API for Calc service. All implementations must embed UnimplementedCalcServer for forward compatibility
type DivideDivByZeroError ¶
type DivideDivByZeroError struct { // division by zero leads to infinity. Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"` // contains filtered or unexported fields }
func (*DivideDivByZeroError) Descriptor
deprecated
func (*DivideDivByZeroError) Descriptor() ([]byte, []int)
Deprecated: Use DivideDivByZeroError.ProtoReflect.Descriptor instead.
func (*DivideDivByZeroError) GetMessage_ ¶
func (x *DivideDivByZeroError) GetMessage_() string
func (*DivideDivByZeroError) ProtoMessage ¶
func (*DivideDivByZeroError) ProtoMessage()
func (*DivideDivByZeroError) ProtoReflect ¶
func (x *DivideDivByZeroError) ProtoReflect() protoreflect.Message
func (*DivideDivByZeroError) Reset ¶
func (x *DivideDivByZeroError) Reset()
func (*DivideDivByZeroError) String ¶
func (x *DivideDivByZeroError) String() string
type DivideRequest ¶
type DivideRequest struct { Dividend int32 `protobuf:"zigzag32,1,opt,name=dividend,proto3" json:"dividend,omitempty"` Divisor int32 `protobuf:"zigzag32,2,opt,name=divisor,proto3" json:"divisor,omitempty"` // contains filtered or unexported fields }
func (*DivideRequest) Descriptor
deprecated
func (*DivideRequest) Descriptor() ([]byte, []int)
Deprecated: Use DivideRequest.ProtoReflect.Descriptor instead.
func (*DivideRequest) GetDividend ¶
func (x *DivideRequest) GetDividend() int32
func (*DivideRequest) GetDivisor ¶
func (x *DivideRequest) GetDivisor() int32
func (*DivideRequest) ProtoMessage ¶
func (*DivideRequest) ProtoMessage()
func (*DivideRequest) ProtoReflect ¶
func (x *DivideRequest) ProtoReflect() protoreflect.Message
func (*DivideRequest) Reset ¶
func (x *DivideRequest) Reset()
func (*DivideRequest) String ¶
func (x *DivideRequest) String() string
type DivideResponse ¶
type DivideResponse struct { Quotient int32 `protobuf:"zigzag32,1,opt,name=quotient,proto3" json:"quotient,omitempty"` Reminder int32 `protobuf:"zigzag32,2,opt,name=reminder,proto3" json:"reminder,omitempty"` // contains filtered or unexported fields }
func (*DivideResponse) Descriptor
deprecated
func (*DivideResponse) Descriptor() ([]byte, []int)
Deprecated: Use DivideResponse.ProtoReflect.Descriptor instead.
func (*DivideResponse) GetQuotient ¶
func (x *DivideResponse) GetQuotient() int32
func (*DivideResponse) GetReminder ¶
func (x *DivideResponse) GetReminder() int32
func (*DivideResponse) ProtoMessage ¶
func (*DivideResponse) ProtoMessage()
func (*DivideResponse) ProtoReflect ¶
func (x *DivideResponse) ProtoReflect() protoreflect.Message
func (*DivideResponse) Reset ¶
func (x *DivideResponse) Reset()
func (*DivideResponse) String ¶
func (x *DivideResponse) String() string
type UnimplementedCalcServer ¶
type UnimplementedCalcServer struct { }
UnimplementedCalcServer must be embedded to have forward compatible implementations.
func (UnimplementedCalcServer) Divide ¶
func (UnimplementedCalcServer) Divide(context.Context, *DivideRequest) (*DivideResponse, error)
type UnsafeCalcServer ¶
type UnsafeCalcServer interface {
// contains filtered or unexported methods
}
UnsafeCalcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CalcServer will result in compilation errors.