__

package
v0.0.0-...-0eaf191 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpc_grpc_proto protoreflect.FileDescriptor
View Source
var Grpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Grpc",
	HandlerType: (*GrpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Grpc_Get_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Grpc_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/grpc.proto",
}

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

Functions

func RegisterGrpcServer

func RegisterGrpcServer(s grpc.ServiceRegistrar, srv GrpcServer)

Types

type GrpcClient

type GrpcClient interface {
	Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

GrpcClient is the client API for Grpc 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 NewGrpcClient

func NewGrpcClient(cc grpc.ClientConnInterface) GrpcClient

type GrpcServer

type GrpcServer interface {
	Get(context.Context, *Request) (*Response, error)
	Delete(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

GrpcServer is the server API for Grpc service. All implementations must embed UnimplementedGrpcServer for forward compatibility

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	IsSucceeded bool `protobuf:"varint,1,opt,name=isSucceeded,proto3" json:"isSucceeded,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetIsSucceeded

func (x *Response) GetIsSucceeded() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedGrpcServer

type UnimplementedGrpcServer struct {
}

UnimplementedGrpcServer must be embedded to have forward compatible implementations.

func (UnimplementedGrpcServer) Delete

func (UnimplementedGrpcServer) Get

type UnsafeGrpcServer

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

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

Jump to

Keyboard shortcuts

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