gen

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Grpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.Grpc",
	HandlerType: (*GrpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Grpc_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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)
}

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)
	// 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 {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetValue

func (x *Response) GetValue() string

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) 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