testproto

package
v0.0.0-...-41f5daf Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testproto holds some non-production protos for testing `requestcheck`.

Index

Constants

View Source
const (
	ExampleService_BidirectionalStream_FullMethodName = "/go.chromium.org.luci.grpc.logging.requestcheck.testproto.ExampleService/BidirectionalStream"
	ExampleService_ClientStream_FullMethodName        = "/go.chromium.org.luci.grpc.logging.requestcheck.testproto.ExampleService/ClientStream"
	ExampleService_ServerStream_FullMethodName        = "/go.chromium.org.luci.grpc.logging.requestcheck.testproto.ExampleService/ServerStream"
	ExampleService_Unary_FullMethodName               = "/go.chromium.org.luci.grpc.logging.requestcheck.testproto.ExampleService/Unary"
)

Variables

View Source
var ExampleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "go.chromium.org.luci.grpc.logging.requestcheck.testproto.ExampleService",
	HandlerType: (*ExampleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unary",
			Handler:    _ExampleService_Unary_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "BidirectionalStream",
			Handler:       _ExampleService_BidirectionalStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "ClientStream",
			Handler:       _ExampleService_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ServerStream",
			Handler:       _ExampleService_ServerStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "go.chromium.org/luci/grpc/logging/requestcheck/testproto/test.proto",
}

ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService 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_go_chromium_org_luci_grpc_logging_requestcheck_testproto_test_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)

Types

type BidirectionalStreamRequest

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

func (*BidirectionalStreamRequest) Descriptor deprecated

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

Deprecated: Use BidirectionalStreamRequest.ProtoReflect.Descriptor instead.

func (*BidirectionalStreamRequest) ProtoMessage

func (*BidirectionalStreamRequest) ProtoMessage()

func (*BidirectionalStreamRequest) ProtoReflect

func (*BidirectionalStreamRequest) Reset

func (x *BidirectionalStreamRequest) Reset()

func (*BidirectionalStreamRequest) String

func (x *BidirectionalStreamRequest) String() string

type ClientStreamRequest

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

func (*ClientStreamRequest) Descriptor deprecated

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

Deprecated: Use ClientStreamRequest.ProtoReflect.Descriptor instead.

func (*ClientStreamRequest) ProtoMessage

func (*ClientStreamRequest) ProtoMessage()

func (*ClientStreamRequest) ProtoReflect

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

func (*ClientStreamRequest) Reset

func (x *ClientStreamRequest) Reset()

func (*ClientStreamRequest) String

func (x *ClientStreamRequest) String() string

type ExampleServiceClient

ExampleServiceClient is the client API for ExampleService 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 ExampleServiceServer

type ExampleServiceServer interface {
	BidirectionalStream(grpc.BidiStreamingServer[BidirectionalStreamRequest, emptypb.Empty]) error
	ClientStream(grpc.ClientStreamingServer[ClientStreamRequest, emptypb.Empty]) error
	ServerStream(*ServerStreamRequest, grpc.ServerStreamingServer[emptypb.Empty]) error
	Unary(context.Context, *UnaryRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility.

type ExampleService_BidirectionalStreamClient

type ExampleService_BidirectionalStreamClient = grpc.BidiStreamingClient[BidirectionalStreamRequest, emptypb.Empty]

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

type ExampleService_BidirectionalStreamServer

type ExampleService_BidirectionalStreamServer = grpc.BidiStreamingServer[BidirectionalStreamRequest, emptypb.Empty]

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

type ExampleService_ClientStreamClient

type ExampleService_ClientStreamClient = grpc.ClientStreamingClient[ClientStreamRequest, emptypb.Empty]

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

type ExampleService_ClientStreamServer

type ExampleService_ClientStreamServer = grpc.ClientStreamingServer[ClientStreamRequest, emptypb.Empty]

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

type ExampleService_ServerStreamClient

type ExampleService_ServerStreamClient = grpc.ServerStreamingClient[emptypb.Empty]

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

type ExampleService_ServerStreamServer

type ExampleService_ServerStreamServer = grpc.ServerStreamingServer[emptypb.Empty]

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

type ServerStreamRequest

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

func (*ServerStreamRequest) Descriptor deprecated

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

Deprecated: Use ServerStreamRequest.ProtoReflect.Descriptor instead.

func (*ServerStreamRequest) ProtoMessage

func (*ServerStreamRequest) ProtoMessage()

func (*ServerStreamRequest) ProtoReflect

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

func (*ServerStreamRequest) Reset

func (x *ServerStreamRequest) Reset()

func (*ServerStreamRequest) String

func (x *ServerStreamRequest) String() string

type UnaryRequest

type UnaryRequest struct {

	// Deprecated: Marked as deprecated in go.chromium.org/luci/grpc/logging/requestcheck/testproto/test.proto.
	BadField bool   `protobuf:"varint,1,opt,name=bad_field,json=badField,proto3" json:"bad_field,omitempty"`
	Ignore   string `protobuf:"bytes,2,opt,name=ignore,proto3" json:"ignore,omitempty"`
	// contains filtered or unexported fields
}

func (*UnaryRequest) Descriptor deprecated

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

Deprecated: Use UnaryRequest.ProtoReflect.Descriptor instead.

func (*UnaryRequest) GetBadField deprecated

func (x *UnaryRequest) GetBadField() bool

Deprecated: Marked as deprecated in go.chromium.org/luci/grpc/logging/requestcheck/testproto/test.proto.

func (*UnaryRequest) GetIgnore

func (x *UnaryRequest) GetIgnore() string

func (*UnaryRequest) ProtoMessage

func (*UnaryRequest) ProtoMessage()

func (*UnaryRequest) ProtoReflect

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

func (*UnaryRequest) Reset

func (x *UnaryRequest) Reset()

func (*UnaryRequest) String

func (x *UnaryRequest) String() string

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct{}

UnimplementedExampleServiceServer must 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 (UnimplementedExampleServiceServer) BidirectionalStream

func (UnimplementedExampleServiceServer) ClientStream

func (UnimplementedExampleServiceServer) ServerStream

func (UnimplementedExampleServiceServer) Unary

type UnsafeExampleServiceServer

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

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

Jump to

Keyboard shortcuts

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