test

package
v17.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Testing_RequestResponse_FullMethodName          = "/gitlab.agent.grpctool.test.Testing/RequestResponse"
	Testing_StreamingRequestResponse_FullMethodName = "/gitlab.agent.grpctool.test.Testing/StreamingRequestResponse"
)

Variables

View Source
var (
	Enum1_name = map[int32]string{
		0: "v1",
		1: "v2",
	}
	Enum1_value = map[string]int32{
		"v1": 0,
		"v2": 1,
	}
)

Enum value maps for Enum1.

View Source
var File_internal_tool_grpctool_test_test_proto protoreflect.FileDescriptor
View Source
var Testing_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gitlab.agent.grpctool.test.Testing",
	HandlerType: (*TestingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RequestResponse",
			Handler:    _Testing_RequestResponse_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamingRequestResponse",
			Handler:       _Testing_StreamingRequestResponse_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "internal/tool/grpctool/test/test.proto",
}

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

Functions

func RegisterTestingServer

func RegisterTestingServer(s grpc.ServiceRegistrar, srv TestingServer)

Types

type Enum1

type Enum1 int32
const (
	Enum1_v1 Enum1 = 0
	Enum1_v2 Enum1 = 1
)

func (Enum1) Descriptor

func (Enum1) Descriptor() protoreflect.EnumDescriptor

func (Enum1) Enum

func (x Enum1) Enum() *Enum1

func (Enum1) EnumDescriptor deprecated

func (Enum1) EnumDescriptor() ([]byte, []int)

Deprecated: Use Enum1.Descriptor instead.

func (Enum1) Number

func (x Enum1) Number() protoreflect.EnumNumber

func (Enum1) String

func (x Enum1) String() string

func (Enum1) Type

func (Enum1) Type() protoreflect.EnumType

type GRPCTestingServer

type GRPCTestingServer struct {
	UnsafeTestingServer
	UnaryFunc     func(context.Context, *Request) (*Response, error)
	StreamingFunc func(grpc.BidiStreamingServer[Request, Response]) error
}

func (*GRPCTestingServer) RequestResponse

func (s *GRPCTestingServer) RequestResponse(ctx context.Context, request *Request) (*Response, error)

func (*GRPCTestingServer) StreamingRequestResponse

func (s *GRPCTestingServer) StreamingRequestResponse(server grpc.BidiStreamingServer[Request, Response]) error

type NoOneofs

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

func (*NoOneofs) Descriptor deprecated

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

Deprecated: Use NoOneofs.ProtoReflect.Descriptor instead.

func (*NoOneofs) ProtoMessage

func (*NoOneofs) ProtoMessage()

func (*NoOneofs) ProtoReflect

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

func (*NoOneofs) Reset

func (x *NoOneofs) Reset()

func (*NoOneofs) String

func (x *NoOneofs) String() string

type NotAllReachable

type NotAllReachable struct {

	// Types that are assignable to Message:
	//
	//	*NotAllReachable_M1
	//	*NotAllReachable_M2
	//	*NotAllReachable_M3
	Message isNotAllReachable_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*NotAllReachable) Descriptor deprecated

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

Deprecated: Use NotAllReachable.ProtoReflect.Descriptor instead.

func (*NotAllReachable) GetM1

func (x *NotAllReachable) GetM1() int32

func (*NotAllReachable) GetM2

func (x *NotAllReachable) GetM2() int32

func (*NotAllReachable) GetM3

func (x *NotAllReachable) GetM3() int32

func (*NotAllReachable) GetMessage

func (m *NotAllReachable) GetMessage() isNotAllReachable_Message

func (*NotAllReachable) ProtoMessage

func (*NotAllReachable) ProtoMessage()

func (*NotAllReachable) ProtoReflect

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

func (*NotAllReachable) Reset

func (x *NotAllReachable) Reset()

func (*NotAllReachable) String

func (x *NotAllReachable) String() string

type NotAllReachable_M1

type NotAllReachable_M1 struct {
	M1 int32 `protobuf:"varint,1,opt,name=m1,proto3,oneof"`
}

type NotAllReachable_M2

type NotAllReachable_M2 struct {
	M2 int32 `protobuf:"varint,2,opt,name=m2,proto3,oneof"`
}

type NotAllReachable_M3

type NotAllReachable_M3 struct {
	M3 int32 `protobuf:"varint,3,opt,name=m3,proto3,oneof"`
}

type OutOfOneof

type OutOfOneof struct {
	X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	// Types that are assignable to Message:
	//
	//	*OutOfOneof_M1
	//	*OutOfOneof_M2
	Message isOutOfOneof_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*OutOfOneof) Descriptor deprecated

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

Deprecated: Use OutOfOneof.ProtoReflect.Descriptor instead.

func (*OutOfOneof) GetM1

func (x *OutOfOneof) GetM1() int32

func (*OutOfOneof) GetM2

func (x *OutOfOneof) GetM2() int32

func (*OutOfOneof) GetMessage

func (m *OutOfOneof) GetMessage() isOutOfOneof_Message

func (*OutOfOneof) GetX

func (x *OutOfOneof) GetX() int32

func (*OutOfOneof) ProtoMessage

func (*OutOfOneof) ProtoMessage()

func (*OutOfOneof) ProtoReflect

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

func (*OutOfOneof) Reset

func (x *OutOfOneof) Reset()

func (*OutOfOneof) String

func (x *OutOfOneof) String() string

type OutOfOneof_M1

type OutOfOneof_M1 struct {
	M1 int32 `protobuf:"varint,2,opt,name=m1,proto3,oneof"`
}

type OutOfOneof_M2

type OutOfOneof_M2 struct {
	M2 int32 `protobuf:"varint,3,opt,name=m2,proto3,oneof"`
}

type Request

type Request struct {
	S1 string `protobuf:"bytes,1,opt,name=s1,proto3" json:"s1,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetS1

func (x *Request) GetS1() string

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 {

	// Types that are assignable to Message:
	//
	//	*Response_Scalar
	//	*Response_X1
	//	*Response_Data_
	//	*Response_Last_
	Message isResponse_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() *Response_Data

func (*Response) GetLast

func (x *Response) GetLast() *Response_Last

func (*Response) GetMessage

func (m *Response) GetMessage() isResponse_Message

func (*Response) GetScalar

func (x *Response) GetScalar() int64

func (*Response) GetX1

func (x *Response) GetX1() Enum1

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 Response_Data

type Response_Data struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Response_Data) Descriptor deprecated

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

Deprecated: Use Response_Data.ProtoReflect.Descriptor instead.

func (*Response_Data) GetData

func (x *Response_Data) GetData() []byte

func (*Response_Data) ProtoMessage

func (*Response_Data) ProtoMessage()

func (*Response_Data) ProtoReflect

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

func (*Response_Data) Reset

func (x *Response_Data) Reset()

func (*Response_Data) String

func (x *Response_Data) String() string

type Response_Data_

type Response_Data_ struct {
	Data *Response_Data `protobuf:"bytes,3,opt,name=data,proto3,oneof"`
}

type Response_Last

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

func (*Response_Last) Descriptor deprecated

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

Deprecated: Use Response_Last.ProtoReflect.Descriptor instead.

func (*Response_Last) ProtoMessage

func (*Response_Last) ProtoMessage()

func (*Response_Last) ProtoReflect

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

func (*Response_Last) Reset

func (x *Response_Last) Reset()

func (*Response_Last) String

func (x *Response_Last) String() string

type Response_Last_

type Response_Last_ struct {
	Last *Response_Last `protobuf:"bytes,4,opt,name=last,proto3,oneof"`
}

type Response_Scalar

type Response_Scalar struct {
	Scalar int64 `protobuf:"varint,1,opt,name=scalar,proto3,oneof"`
}

type Response_X1

type Response_X1 struct {
	X1 Enum1 `protobuf:"varint,2,opt,name=x1,proto3,enum=gitlab.agent.grpctool.test.Enum1,oneof"`
}

type TestingClient

type TestingClient interface {
	RequestResponse(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	StreamingRequestResponse(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Request, Response], error)
}

TestingClient is the client API for Testing 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 NewTestingClient

func NewTestingClient(cc grpc.ClientConnInterface) TestingClient

type TestingServer

type TestingServer interface {
	RequestResponse(context.Context, *Request) (*Response, error)
	StreamingRequestResponse(grpc.BidiStreamingServer[Request, Response]) error
	// contains filtered or unexported methods
}

TestingServer is the server API for Testing service. All implementations must embed UnimplementedTestingServer for forward compatibility.

type Testing_StreamingRequestResponseClient

type Testing_StreamingRequestResponseClient = grpc.BidiStreamingClient[Request, Response]

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

type Testing_StreamingRequestResponseServer

type Testing_StreamingRequestResponseServer = grpc.BidiStreamingServer[Request, Response]

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

type TwoOneofs

type TwoOneofs struct {

	// Types that are assignable to Message1:
	//
	//	*TwoOneofs_M11
	//	*TwoOneofs_M12
	Message1 isTwoOneofs_Message1 `protobuf_oneof:"message1"`
	// Types that are assignable to Message2:
	//
	//	*TwoOneofs_M21
	//	*TwoOneofs_M22
	Message2 isTwoOneofs_Message2 `protobuf_oneof:"message2"`
	// contains filtered or unexported fields
}

func (*TwoOneofs) Descriptor deprecated

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

Deprecated: Use TwoOneofs.ProtoReflect.Descriptor instead.

func (*TwoOneofs) GetM11

func (x *TwoOneofs) GetM11() int32

func (*TwoOneofs) GetM12

func (x *TwoOneofs) GetM12() int32

func (*TwoOneofs) GetM21

func (x *TwoOneofs) GetM21() int32

func (*TwoOneofs) GetM22

func (x *TwoOneofs) GetM22() int32

func (*TwoOneofs) GetMessage1

func (m *TwoOneofs) GetMessage1() isTwoOneofs_Message1

func (*TwoOneofs) GetMessage2

func (m *TwoOneofs) GetMessage2() isTwoOneofs_Message2

func (*TwoOneofs) ProtoMessage

func (*TwoOneofs) ProtoMessage()

func (*TwoOneofs) ProtoReflect

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

func (*TwoOneofs) Reset

func (x *TwoOneofs) Reset()

func (*TwoOneofs) String

func (x *TwoOneofs) String() string

type TwoOneofs_M11

type TwoOneofs_M11 struct {
	M11 int32 `protobuf:"varint,1,opt,name=m11,proto3,oneof"`
}

type TwoOneofs_M12

type TwoOneofs_M12 struct {
	M12 int32 `protobuf:"varint,2,opt,name=m12,proto3,oneof"`
}

type TwoOneofs_M21

type TwoOneofs_M21 struct {
	M21 int32 `protobuf:"varint,3,opt,name=m21,proto3,oneof"`
}

type TwoOneofs_M22

type TwoOneofs_M22 struct {
	M22 int32 `protobuf:"varint,4,opt,name=m22,proto3,oneof"`
}

type TwoValidOneofs

type TwoValidOneofs struct {

	// Types that are assignable to Message1:
	//
	//	*TwoValidOneofs_M11
	//	*TwoValidOneofs_M12
	Message1 isTwoValidOneofs_Message1 `protobuf_oneof:"message1"`
	// Types that are assignable to Message2:
	//
	//	*TwoValidOneofs_M21
	//	*TwoValidOneofs_M22
	Message2 isTwoValidOneofs_Message2 `protobuf_oneof:"message2"`
	// contains filtered or unexported fields
}

func (*TwoValidOneofs) Descriptor deprecated

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

Deprecated: Use TwoValidOneofs.ProtoReflect.Descriptor instead.

func (*TwoValidOneofs) GetM11

func (x *TwoValidOneofs) GetM11() int32

func (*TwoValidOneofs) GetM12

func (x *TwoValidOneofs) GetM12() int32

func (*TwoValidOneofs) GetM21

func (x *TwoValidOneofs) GetM21() int32

func (*TwoValidOneofs) GetM22

func (x *TwoValidOneofs) GetM22() int32

func (*TwoValidOneofs) GetMessage1

func (m *TwoValidOneofs) GetMessage1() isTwoValidOneofs_Message1

func (*TwoValidOneofs) GetMessage2

func (m *TwoValidOneofs) GetMessage2() isTwoValidOneofs_Message2

func (*TwoValidOneofs) ProtoMessage

func (*TwoValidOneofs) ProtoMessage()

func (*TwoValidOneofs) ProtoReflect

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

func (*TwoValidOneofs) Reset

func (x *TwoValidOneofs) Reset()

func (*TwoValidOneofs) String

func (x *TwoValidOneofs) String() string

type TwoValidOneofs_M11

type TwoValidOneofs_M11 struct {
	M11 int32 `protobuf:"varint,1,opt,name=m11,proto3,oneof"`
}

type TwoValidOneofs_M12

type TwoValidOneofs_M12 struct {
	M12 int32 `protobuf:"varint,2,opt,name=m12,proto3,oneof"`
}

type TwoValidOneofs_M21

type TwoValidOneofs_M21 struct {
	M21 int32 `protobuf:"varint,3,opt,name=m21,proto3,oneof"`
}

type TwoValidOneofs_M22

type TwoValidOneofs_M22 struct {
	M22 int32 `protobuf:"varint,4,opt,name=m22,proto3,oneof"`
}

type UnimplementedTestingServer

type UnimplementedTestingServer struct{}

UnimplementedTestingServer 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 (UnimplementedTestingServer) RequestResponse

func (UnimplementedTestingServer) StreamingRequestResponse

type UnsafeTestingServer

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

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

Jump to

Keyboard shortcuts

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