Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCalcServer(s grpc.ServiceRegistrar, srv CalcServer)
- type CalcClient
- type CalcServer
- type MultiplyRequest
- func (*MultiplyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MultiplyRequest) GetA() int32
- func (x *MultiplyRequest) GetB() int32
- func (*MultiplyRequest) ProtoMessage()
- func (x *MultiplyRequest) ProtoReflect() protoreflect.Message
- func (x *MultiplyRequest) Reset()
- func (x *MultiplyRequest) String() string
- type MultiplyResponse
- type UnimplementedCalcServer
- type UnsafeCalcServer
Constants ¶
const (
Calc_Multiply_FullMethodName = "/calc.Calc/Multiply"
)
Variables ¶
var Calc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "calc.Calc", HandlerType: (*CalcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Multiply", Handler: _Calc_Multiply_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "goagen_basic_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_basic_calc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCalcServer ¶
func RegisterCalcServer(s grpc.ServiceRegistrar, srv CalcServer)
Types ¶
type CalcClient ¶
type CalcClient interface { // Multiply implements multiply. Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOption) (*MultiplyResponse, 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 { // Multiply implements multiply. Multiply(context.Context, *MultiplyRequest) (*MultiplyResponse, error) // contains filtered or unexported methods }
CalcServer is the server API for Calc service. All implementations must embed UnimplementedCalcServer for forward compatibility
type MultiplyRequest ¶
type MultiplyRequest struct { // Left operand A int32 `protobuf:"zigzag32,1,opt,name=a,proto3" json:"a,omitempty"` // Right operand B int32 `protobuf:"zigzag32,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*MultiplyRequest) Descriptor
deprecated
func (*MultiplyRequest) Descriptor() ([]byte, []int)
Deprecated: Use MultiplyRequest.ProtoReflect.Descriptor instead.
func (*MultiplyRequest) GetA ¶
func (x *MultiplyRequest) GetA() int32
func (*MultiplyRequest) GetB ¶
func (x *MultiplyRequest) GetB() int32
func (*MultiplyRequest) ProtoMessage ¶
func (*MultiplyRequest) ProtoMessage()
func (*MultiplyRequest) ProtoReflect ¶
func (x *MultiplyRequest) ProtoReflect() protoreflect.Message
func (*MultiplyRequest) Reset ¶
func (x *MultiplyRequest) Reset()
func (*MultiplyRequest) String ¶
func (x *MultiplyRequest) String() string
type MultiplyResponse ¶
type MultiplyResponse struct { Field int32 `protobuf:"zigzag32,1,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*MultiplyResponse) Descriptor
deprecated
func (*MultiplyResponse) Descriptor() ([]byte, []int)
Deprecated: Use MultiplyResponse.ProtoReflect.Descriptor instead.
func (*MultiplyResponse) GetField ¶
func (x *MultiplyResponse) GetField() int32
func (*MultiplyResponse) ProtoMessage ¶
func (*MultiplyResponse) ProtoMessage()
func (*MultiplyResponse) ProtoReflect ¶
func (x *MultiplyResponse) ProtoReflect() protoreflect.Message
func (*MultiplyResponse) Reset ¶
func (x *MultiplyResponse) Reset()
func (*MultiplyResponse) String ¶
func (x *MultiplyResponse) String() string
type UnimplementedCalcServer ¶
type UnimplementedCalcServer struct { }
UnimplementedCalcServer must be embedded to have forward compatible implementations.
func (UnimplementedCalcServer) Multiply ¶
func (UnimplementedCalcServer) Multiply(context.Context, *MultiplyRequest) (*MultiplyResponse, 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.