proto

package
v0.0.0-...-769e691 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 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{
		{
			StreamName:    "Primes",
			Handler:       _CalculatorService_Primes_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Avg",
			Handler:       _CalculatorService_Avg_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Max",
			Handler:       _CalculatorService_Max_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	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
View Source
var File_primes_proto protoreflect.FileDescriptor

Functions

func RegisterCalculatorServiceServer

func RegisterCalculatorServiceServer(s grpc.ServiceRegistrar, srv CalculatorServiceServer)

Types

type AvgRequest

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

func (*AvgRequest) Descriptor deprecated

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

Deprecated: Use AvgRequest.ProtoReflect.Descriptor instead.

func (*AvgRequest) GetNumber

func (x *AvgRequest) GetNumber() int32

func (*AvgRequest) ProtoMessage

func (*AvgRequest) ProtoMessage()

func (*AvgRequest) ProtoReflect

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

func (*AvgRequest) Reset

func (x *AvgRequest) Reset()

func (*AvgRequest) String

func (x *AvgRequest) String() string

type AvgResponse

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

func (*AvgResponse) Descriptor deprecated

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

Deprecated: Use AvgResponse.ProtoReflect.Descriptor instead.

func (*AvgResponse) GetResult

func (x *AvgResponse) GetResult() float64

func (*AvgResponse) ProtoMessage

func (*AvgResponse) ProtoMessage()

func (*AvgResponse) ProtoReflect

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

func (*AvgResponse) Reset

func (x *AvgResponse) Reset()

func (*AvgResponse) String

func (x *AvgResponse) String() string

type CalculatorServiceClient

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)
	Primes(*PrimeRequest, CalculatorService_PrimesServer) error
	Avg(CalculatorService_AvgServer) error
	Max(CalculatorService_MaxServer) 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 CalculatorService_AvgClient

type CalculatorService_AvgClient interface {
	Send(*AvgRequest) error
	CloseAndRecv() (*AvgResponse, error)
	grpc.ClientStream
}

type CalculatorService_AvgServer

type CalculatorService_AvgServer interface {
	SendAndClose(*AvgResponse) error
	Recv() (*AvgRequest, error)
	grpc.ServerStream
}

type CalculatorService_MaxClient

type CalculatorService_MaxClient interface {
	Send(*MaxRequest) error
	Recv() (*MaxResponse, error)
	grpc.ClientStream
}

type CalculatorService_MaxServer

type CalculatorService_MaxServer interface {
	Send(*MaxResponse) error
	Recv() (*MaxRequest, error)
	grpc.ServerStream
}

type CalculatorService_PrimesClient

type CalculatorService_PrimesClient interface {
	Recv() (*PrimeResponse, error)
	grpc.ClientStream
}

type CalculatorService_PrimesServer

type CalculatorService_PrimesServer interface {
	Send(*PrimeResponse) error
	grpc.ServerStream
}

type MaxRequest

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

func (*MaxRequest) Descriptor deprecated

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

Deprecated: Use MaxRequest.ProtoReflect.Descriptor instead.

func (*MaxRequest) GetNumber

func (x *MaxRequest) GetNumber() int32

func (*MaxRequest) ProtoMessage

func (*MaxRequest) ProtoMessage()

func (*MaxRequest) ProtoReflect

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

func (*MaxRequest) Reset

func (x *MaxRequest) Reset()

func (*MaxRequest) String

func (x *MaxRequest) String() string

type MaxResponse

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

func (*MaxResponse) Descriptor deprecated

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

Deprecated: Use MaxResponse.ProtoReflect.Descriptor instead.

func (*MaxResponse) GetResult

func (x *MaxResponse) GetResult() int32

func (*MaxResponse) ProtoMessage

func (*MaxResponse) ProtoMessage()

func (*MaxResponse) ProtoReflect

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

func (*MaxResponse) Reset

func (x *MaxResponse) Reset()

func (*MaxResponse) String

func (x *MaxResponse) String() string

type PrimeRequest

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

func (*PrimeRequest) Descriptor deprecated

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

Deprecated: Use PrimeRequest.ProtoReflect.Descriptor instead.

func (*PrimeRequest) GetNumber

func (x *PrimeRequest) GetNumber() int64

func (*PrimeRequest) ProtoMessage

func (*PrimeRequest) ProtoMessage()

func (*PrimeRequest) ProtoReflect

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

func (*PrimeRequest) Reset

func (x *PrimeRequest) Reset()

func (*PrimeRequest) String

func (x *PrimeRequest) String() string

type PrimeResponse

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

func (*PrimeResponse) Descriptor deprecated

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

Deprecated: Use PrimeResponse.ProtoReflect.Descriptor instead.

func (*PrimeResponse) GetResult

func (x *PrimeResponse) GetResult() int64

func (*PrimeResponse) ProtoMessage

func (*PrimeResponse) ProtoMessage()

func (*PrimeResponse) ProtoReflect

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

func (*PrimeResponse) Reset

func (x *PrimeResponse) Reset()

func (*PrimeResponse) String

func (x *PrimeResponse) String() string

type SqrtRequest

type SqrtRequest struct {
	Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // could be uint32
	// 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 {
	FirstNumber  int32 `protobuf:"varint,1,opt,name=first_number,json=firstNumber,proto3" json:"first_number,omitempty"`
	SecondNumber int32 `protobuf:"varint,2,opt,name=second_number,json=secondNumber,proto3" json:"second_number,omitempty"`
	// contains filtered or unexported fields
}

func (*SumRequest) Descriptor deprecated

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

Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.

func (*SumRequest) GetFirstNumber

func (x *SumRequest) GetFirstNumber() int32

func (*SumRequest) GetSecondNumber

func (x *SumRequest) GetSecondNumber() 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) Avg

func (UnimplementedCalculatorServiceServer) Max

func (UnimplementedCalculatorServiceServer) Primes

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