proto

package
v0.0.0-...-520c2dc Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CalculatorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "calculator.CalculatorService",
	HandlerType: (*CalculatorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sum",
			Handler:    _CalculatorService_Sum_Handler,
		},
		{
			MethodName: "Sqrt",
			Handler:    _CalculatorService_Sqrt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "calculator.proto",
}

CalculatorService_ServiceDesc is the grpc.ServiceDesc for CalculatorService 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 RegisterCalculatorServiceServer

func RegisterCalculatorServiceServer(s grpc.ServiceRegistrar, srv CalculatorServiceServer)

Types

type CalculatorServiceClient

type CalculatorServiceClient interface {
	Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
	Sqrt(ctx context.Context, in *SqrtRequest, opts ...grpc.CallOption) (*SqrtResponse, error)
}

CalculatorServiceClient is the client API for CalculatorService 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.

type CalculatorServiceServer

type CalculatorServiceServer interface {
	Sum(context.Context, *SumRequest) (*SumResponse, error)
	Sqrt(context.Context, *SqrtRequest) (*SqrtResponse, error)
	// contains filtered or unexported methods
}

CalculatorServiceServer is the server API for CalculatorService service. All implementations must embed UnimplementedCalculatorServiceServer for forward compatibility

type SqrtRequest

type SqrtRequest struct {
	Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*SqrtRequest) Descriptor deprecated

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

Deprecated: Use SqrtRequest.ProtoReflect.Descriptor instead.

func (*SqrtRequest) GetNumber

func (x *SqrtRequest) GetNumber() int32

func (*SqrtRequest) ProtoMessage

func (*SqrtRequest) ProtoMessage()

func (*SqrtRequest) ProtoReflect

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

func (*SqrtRequest) Reset

func (x *SqrtRequest) Reset()

func (*SqrtRequest) String

func (x *SqrtRequest) String() string

type SqrtResponse

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

func (*SqrtResponse) Descriptor deprecated

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

Deprecated: Use SqrtResponse.ProtoReflect.Descriptor instead.

func (*SqrtResponse) GetResult

func (x *SqrtResponse) GetResult() float64

func (*SqrtResponse) ProtoMessage

func (*SqrtResponse) ProtoMessage()

func (*SqrtResponse) ProtoReflect

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

func (*SqrtResponse) Reset

func (x *SqrtResponse) Reset()

func (*SqrtResponse) String

func (x *SqrtResponse) String() string

type SumRequest

type SumRequest struct {
	First  int32 `protobuf:"varint,1,opt,name=first,proto3" json:"first,omitempty"`
	Second int32 `protobuf:"varint,2,opt,name=second,proto3" json:"second,omitempty"`
	// contains filtered or unexported fields
}

func (*SumRequest) Descriptor deprecated

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

Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.

func (*SumRequest) GetFirst

func (x *SumRequest) GetFirst() int32

func (*SumRequest) GetSecond

func (x *SumRequest) GetSecond() int32

func (*SumRequest) ProtoMessage

func (*SumRequest) ProtoMessage()

func (*SumRequest) ProtoReflect

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

func (*SumRequest) Reset

func (x *SumRequest) Reset()

func (*SumRequest) String

func (x *SumRequest) String() string

type SumResponse

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

func (*SumResponse) Descriptor deprecated

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

Deprecated: Use SumResponse.ProtoReflect.Descriptor instead.

func (*SumResponse) GetResult

func (x *SumResponse) GetResult() int32

func (*SumResponse) ProtoMessage

func (*SumResponse) ProtoMessage()

func (*SumResponse) ProtoReflect

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

func (*SumResponse) Reset

func (x *SumResponse) Reset()

func (*SumResponse) String

func (x *SumResponse) String() string

type UnimplementedCalculatorServiceServer

type UnimplementedCalculatorServiceServer struct {
}

UnimplementedCalculatorServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCalculatorServiceServer) Sqrt

func (UnimplementedCalculatorServiceServer) Sum

type UnsafeCalculatorServiceServer

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

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

Jump to

Keyboard shortcuts

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