protogen

package
v0.0.0-...-dbb0582 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Test_Unary_FullMethodName               = "/com.github.veqryn.slogcontext.grpc.test.Test/Unary"
	Test_ClientStream_FullMethodName        = "/com.github.veqryn.slogcontext.grpc.test.Test/ClientStream"
	Test_ServerStream_FullMethodName        = "/com.github.veqryn.slogcontext.grpc.test.Test/ServerStream"
	Test_BidirectionalStream_FullMethodName = "/com.github.veqryn.slogcontext.grpc.test.Test/BidirectionalStream"
)

Variables

View Source
var Test_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "com.github.veqryn.slogcontext.grpc.test.Test",
	HandlerType: (*TestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unary",
			Handler:    _Test_Unary_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ClientStream",
			Handler:       _Test_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ServerStream",
			Handler:       _Test_ServerStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BidirectionalStream",
			Handler:       _Test_BidirectionalStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "test.proto",
}

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

Functions

func RegisterTestServer

func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)

Types

type TestClient

type TestClient interface {
	Unary(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestResp, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[TestReq, TestResp], error)
	ServerStream(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TestResp], error)
	BidirectionalStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TestReq, TestResp], error)
}

TestClient is the client API for Test 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.

The HuntApp gRPC services.

func NewTestClient

func NewTestClient(cc grpc.ClientConnInterface) TestClient

type TestReq

type TestReq struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Option int32  `protobuf:"varint,2,opt,name=option,proto3" json:"option,omitempty"`
	// contains filtered or unexported fields
}

func (*TestReq) Descriptor deprecated

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

Deprecated: Use TestReq.ProtoReflect.Descriptor instead.

func (*TestReq) GetName

func (x *TestReq) GetName() string

func (*TestReq) GetOption

func (x *TestReq) GetOption() int32

func (*TestReq) ProtoMessage

func (*TestReq) ProtoMessage()

func (*TestReq) ProtoReflect

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

func (*TestReq) Reset

func (x *TestReq) Reset()

func (*TestReq) String

func (x *TestReq) String() string

type TestResp

type TestResp struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Option int32  `protobuf:"varint,2,opt,name=option,proto3" json:"option,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResp) Descriptor deprecated

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

Deprecated: Use TestResp.ProtoReflect.Descriptor instead.

func (*TestResp) GetName

func (x *TestResp) GetName() string

func (*TestResp) GetOption

func (x *TestResp) GetOption() int32

func (*TestResp) ProtoMessage

func (*TestResp) ProtoMessage()

func (*TestResp) ProtoReflect

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

func (*TestResp) Reset

func (x *TestResp) Reset()

func (*TestResp) String

func (x *TestResp) String() string

type TestServer

type TestServer interface {
	Unary(context.Context, *TestReq) (*TestResp, error)
	ClientStream(grpc.ClientStreamingServer[TestReq, TestResp]) error
	ServerStream(*TestReq, grpc.ServerStreamingServer[TestResp]) error
	BidirectionalStream(grpc.BidiStreamingServer[TestReq, TestResp]) error
}

TestServer is the server API for Test service. All implementations should embed UnimplementedTestServer for forward compatibility.

The HuntApp gRPC services.

type Test_BidirectionalStreamClient

type Test_BidirectionalStreamClient = grpc.BidiStreamingClient[TestReq, TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Test_BidirectionalStreamServer

type Test_BidirectionalStreamServer = grpc.BidiStreamingServer[TestReq, TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Test_ClientStreamClient

type Test_ClientStreamClient = grpc.ClientStreamingClient[TestReq, TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Test_ClientStreamServer

type Test_ClientStreamServer = grpc.ClientStreamingServer[TestReq, TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Test_ServerStreamClient

type Test_ServerStreamClient = grpc.ServerStreamingClient[TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Test_ServerStreamServer

type Test_ServerStreamServer = grpc.ServerStreamingServer[TestResp]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedTestServer

type UnimplementedTestServer struct{}

UnimplementedTestServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTestServer) BidirectionalStream

func (UnimplementedTestServer) ClientStream

func (UnimplementedTestServer) ServerStream

func (UnimplementedTestServer) Unary

type UnsafeTestServer

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

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

Jump to

Keyboard shortcuts

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