protocodegen

package
v0.0.0-...-06a1c6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Calculator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "calculator.Calculator",
	HandlerType: (*CalculatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Add",
			Handler:    _Calculator_Add_Handler,
		},
		{
			MethodName: "Divide",
			Handler:    _Calculator_Divide_Handler,
		},
		{
			MethodName: "Sum",
			Handler:    _Calculator_Sum_Handler,
		},
		{
			MethodName: "Sub",
			Handler:    _Calculator_Sub_Handler,
		},
		{
			MethodName: "Multiply",
			Handler:    _Calculator_Multiply_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "calculator.proto",
}

Calculator_ServiceDesc is the grpc.ServiceDesc for Calculator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_calculator_proto protoreflect.FileDescriptor

Functions

func RegisterCalculatorServer

func RegisterCalculatorServer(s grpc.ServiceRegistrar, srv CalculatorServer)

Types

type CalculationRequest

type CalculationRequest struct {
	A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*CalculationRequest) Descriptor deprecated

func (*CalculationRequest) Descriptor() ([]byte, []int)

Deprecated: Use CalculationRequest.ProtoReflect.Descriptor instead.

func (*CalculationRequest) GetA

func (x *CalculationRequest) GetA() int64

func (*CalculationRequest) GetB

func (x *CalculationRequest) GetB() int64

func (*CalculationRequest) ProtoMessage

func (*CalculationRequest) ProtoMessage()

func (*CalculationRequest) ProtoReflect

func (x *CalculationRequest) ProtoReflect() protoreflect.Message

func (*CalculationRequest) Reset

func (x *CalculationRequest) Reset()

func (*CalculationRequest) String

func (x *CalculationRequest) String() string

type CalculationResponse

type CalculationResponse struct {
	Result int64 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*CalculationResponse) Descriptor deprecated

func (*CalculationResponse) Descriptor() ([]byte, []int)

Deprecated: Use CalculationResponse.ProtoReflect.Descriptor instead.

func (*CalculationResponse) GetResult

func (x *CalculationResponse) GetResult() int64

func (*CalculationResponse) ProtoMessage

func (*CalculationResponse) ProtoMessage()

func (*CalculationResponse) ProtoReflect

func (x *CalculationResponse) ProtoReflect() protoreflect.Message

func (*CalculationResponse) Reset

func (x *CalculationResponse) Reset()

func (*CalculationResponse) String

func (x *CalculationResponse) String() string

type CalculatorClient

CalculatorClient is the client API for Calculator 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 NewCalculatorClient

func NewCalculatorClient(cc grpc.ClientConnInterface) CalculatorClient

type CalculatorServer

CalculatorServer is the server API for Calculator service. All implementations must embed UnimplementedCalculatorServer for forward compatibility

type NumbersRequest

type NumbersRequest struct {
	Numbers []int64 `protobuf:"varint,1,rep,packed,name=numbers,proto3" json:"numbers,omitempty"`
	// contains filtered or unexported fields
}

func (*NumbersRequest) Descriptor deprecated

func (*NumbersRequest) Descriptor() ([]byte, []int)

Deprecated: Use NumbersRequest.ProtoReflect.Descriptor instead.

func (*NumbersRequest) GetNumbers

func (x *NumbersRequest) GetNumbers() []int64

func (*NumbersRequest) ProtoMessage

func (*NumbersRequest) ProtoMessage()

func (*NumbersRequest) ProtoReflect

func (x *NumbersRequest) ProtoReflect() protoreflect.Message

func (*NumbersRequest) Reset

func (x *NumbersRequest) Reset()

func (*NumbersRequest) String

func (x *NumbersRequest) String() string

type UnimplementedCalculatorServer

type UnimplementedCalculatorServer struct {
}

UnimplementedCalculatorServer must be embedded to have forward compatible implementations.

func (UnimplementedCalculatorServer) Add

func (UnimplementedCalculatorServer) Divide

func (UnimplementedCalculatorServer) Multiply

func (UnimplementedCalculatorServer) Sub

func (UnimplementedCalculatorServer) Sum

type UnsafeCalculatorServer

type UnsafeCalculatorServer interface {
	// contains filtered or unexported methods
}

UnsafeCalculatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CalculatorServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL