qrpc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_qrpc_pb_quotes_proto protoreflect.FileDescriptor
View Source
var QuotesActionsRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qrpc.QuotesActionsRPC",
	HandlerType: (*QuotesActionsRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRandom",
			Handler:    _QuotesActionsRPC_GetRandom_Handler,
		},
		{
			MethodName: "HealthCheck",
			Handler:    _QuotesActionsRPC_HealthCheck_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qrpc/pb/quotes.proto",
}

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

Functions

func RegisterQuotesActionsRPCServer

func RegisterQuotesActionsRPCServer(s grpc.ServiceRegistrar, srv QuotesActionsRPCServer)

Types

type Quote

type Quote struct {
	Id     int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Text   string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"`
	// contains filtered or unexported fields
}

func (*Quote) Descriptor deprecated

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

Deprecated: Use Quote.ProtoReflect.Descriptor instead.

func (*Quote) GetAuthor

func (x *Quote) GetAuthor() string

func (*Quote) GetId

func (x *Quote) GetId() int64

func (*Quote) GetText

func (x *Quote) GetText() string

func (*Quote) ProtoMessage

func (*Quote) ProtoMessage()

func (*Quote) ProtoReflect

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

func (*Quote) Reset

func (x *Quote) Reset()

func (*Quote) String

func (x *Quote) String() string

type QuotesActionsRPCClient

type QuotesActionsRPCClient interface {
	GetRandom(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Quote, error)
	HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

QuotesActionsRPCClient is the client API for QuotesActionsRPC 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 QuotesActionsRPCServer

type QuotesActionsRPCServer interface {
	GetRandom(context.Context, *emptypb.Empty) (*Quote, error)
	HealthCheck(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

QuotesActionsRPCServer is the server API for QuotesActionsRPC service. All implementations must embed UnimplementedQuotesActionsRPCServer for forward compatibility

type UnimplementedQuotesActionsRPCServer

type UnimplementedQuotesActionsRPCServer struct {
}

UnimplementedQuotesActionsRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedQuotesActionsRPCServer) GetRandom

func (UnimplementedQuotesActionsRPCServer) HealthCheck

type UnsafeQuotesActionsRPCServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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