Documentation
¶
Overview ¶
Package testproto holds some non-production protos for testing `requestcheck`.
Index ¶
- Constants
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type BidirectionalStreamRequest
- type ClientStreamRequest
- type ExampleServiceClient
- type ExampleServiceServer
- type ExampleService_BidirectionalStreamClient
- type ExampleService_BidirectionalStreamServer
- type ExampleService_ClientStreamClient
- type ExampleService_ClientStreamServer
- type ExampleService_ServerStreamClient
- type ExampleService_ServerStreamServer
- type ServerStreamRequest
- type UnaryRequest
- func (*UnaryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UnaryRequest) GetBadField() booldeprecated
- func (x *UnaryRequest) GetIgnore() string
- func (*UnaryRequest) ProtoMessage()
- func (x *UnaryRequest) ProtoReflect() protoreflect.Message
- func (x *UnaryRequest) Reset()
- func (x *UnaryRequest) String() string
- type UnimplementedExampleServiceServer
- func (UnimplementedExampleServiceServer) BidirectionalStream(grpc.BidiStreamingServer[BidirectionalStreamRequest, emptypb.Empty]) error
- func (UnimplementedExampleServiceServer) ClientStream(grpc.ClientStreamingServer[ClientStreamRequest, emptypb.Empty]) error
- func (UnimplementedExampleServiceServer) ServerStream(*ServerStreamRequest, grpc.ServerStreamingServer[emptypb.Empty]) error
- func (UnimplementedExampleServiceServer) Unary(context.Context, *UnaryRequest) (*emptypb.Empty, error)
- type UnsafeExampleServiceServer
Constants ¶
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 ¶
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)
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 (x *BidirectionalStreamRequest) ProtoReflect() protoreflect.Message
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 ¶
type ExampleServiceClient interface { BidirectionalStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[BidirectionalStreamRequest, emptypb.Empty], error) ClientStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ClientStreamRequest, emptypb.Empty], error) ServerStream(ctx context.Context, in *ServerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[emptypb.Empty], error) Unary(ctx context.Context, in *UnaryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
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.
func NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
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) BidirectionalStream(grpc.BidiStreamingServer[BidirectionalStreamRequest, emptypb.Empty]) error
func (UnimplementedExampleServiceServer) ClientStream ¶
func (UnimplementedExampleServiceServer) ClientStream(grpc.ClientStreamingServer[ClientStreamRequest, emptypb.Empty]) error
func (UnimplementedExampleServiceServer) ServerStream ¶
func (UnimplementedExampleServiceServer) ServerStream(*ServerStreamRequest, grpc.ServerStreamingServer[emptypb.Empty]) error
func (UnimplementedExampleServiceServer) Unary ¶
func (UnimplementedExampleServiceServer) Unary(context.Context, *UnaryRequest) (*emptypb.Empty, error)
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.