test

package
v0.0.0-...-c2772ec Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tests_pb_test_proto protoreflect.FileDescriptor
View Source
var Test_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "go.client.test.Test",
	HandlerType: (*TestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UnaryEmpty",
			Handler:    _Test_UnaryEmpty_Handler,
		},
		{
			MethodName: "UnaryReqParams",
			Handler:    _Test_UnaryReqParams_Handler,
		},
		{
			MethodName: "UnaryResParams",
			Handler:    _Test_UnaryResParams_Handler,
		},
		{
			MethodName: "UnaryOneOfParams",
			Handler:    _Test_UnaryOneOfParams_Handler,
		},
		{
			MethodName: "UnaryParams",
			Handler:    _Test_UnaryParams_Handler,
		},
		{
			MethodName: "UnaryExternal",
			Handler:    _Test_UnaryExternal_Handler,
		},
		{
			MethodName: "UnaryParamsAny",
			Handler:    _Test_UnaryParamsAny_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ClientStream",
			Handler:       _Test_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ServerStream",
			Handler:       _Test_ServerStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Stream",
			Handler:       _Test_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "tests/pb/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 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 ClientStreamResponse

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

func (*ClientStreamResponse) Descriptor deprecated

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

Deprecated: Use ClientStreamResponse.ProtoReflect.Descriptor instead.

func (*ClientStreamResponse) ProtoMessage

func (*ClientStreamResponse) ProtoMessage()

func (*ClientStreamResponse) ProtoReflect

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

func (*ClientStreamResponse) Reset

func (x *ClientStreamResponse) Reset()

func (*ClientStreamResponse) String

func (x *ClientStreamResponse) String() string

type Message

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

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type ServerStreamMsg

type ServerStreamMsg struct {
	Msg *UnaryResponseParams
	Err error
}

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 ServerStreamResponse

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

func (*ServerStreamResponse) Descriptor deprecated

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

Deprecated: Use ServerStreamResponse.ProtoReflect.Descriptor instead.

func (*ServerStreamResponse) ProtoMessage

func (*ServerStreamResponse) ProtoMessage()

func (*ServerStreamResponse) ProtoReflect

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

func (*ServerStreamResponse) Reset

func (x *ServerStreamResponse) Reset()

func (*ServerStreamResponse) String

func (x *ServerStreamResponse) String() string

type StreamRequest

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

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) ProtoReflect

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

func (*StreamRequest) Reset

func (x *StreamRequest) Reset()

func (*StreamRequest) String

func (x *StreamRequest) String() string

type StreamResponse

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

func (*StreamResponse) Descriptor deprecated

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

Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) ProtoReflect

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

func (*StreamResponse) Reset

func (x *StreamResponse) Reset()

func (*StreamResponse) String

func (x *StreamResponse) String() string

type String

type String string

type Test

type Test interface {
	UnaryEmpty(ctx context.Context, opts ...grpc.CallOption) (err error)
	UnaryReqParams(ctx context.Context, msg *Message, opts ...grpc.CallOption) (err error)
	UnaryResParams(ctx context.Context, opts ...grpc.CallOption) (Msg *Message, err error)
	UnaryOneOfParams(ctx context.Context, oneOf isUnaryOneOfParamsMsg_OneOf, opts ...grpc.CallOption) (OneOf isUnaryOneOfParamsMsg_OneOf, err error)
	UnaryParams(ctx context.Context, msg *Message, opts ...grpc.CallOption) (Msg *Message, err error)
	UnaryExternal(ctx context.Context, name ext.Name, value string, opts ...grpc.CallOption) (Name ext.Name, Value string, err error)
	UnaryParamsAny(ctx context.Context, any *anypb.Any, string *String, int64 *int64, opts ...grpc.CallOption) (Any *anypb.Any, String_ *String, Int64 *int64, err error)
	ServerStream(ctx context.Context, msg *Message, opts ...grpc.CallOption) (<-chan *ServerStreamMsg, error)
}

func NewTest

func NewTest(cc grpc.ClientConnInterface) Test

type TestClient

type TestClient interface {
	UnaryEmpty(ctx context.Context, in *UnaryEmptyRequest, opts ...grpc.CallOption) (*UnaryEmptyResponse, error)
	UnaryReqParams(ctx context.Context, in *UnaryRequestParams, opts ...grpc.CallOption) (*UnaryEmptyResponse, error)
	UnaryResParams(ctx context.Context, in *UnaryEmptyRequest, opts ...grpc.CallOption) (*UnaryResponseParams, error)
	UnaryOneOfParams(ctx context.Context, in *UnaryOneOfParamsMsg, opts ...grpc.CallOption) (*UnaryOneOfParamsMsg, error)
	UnaryParams(ctx context.Context, in *UnaryRequestParams, opts ...grpc.CallOption) (*UnaryResponseParams, error)
	UnaryExternal(ctx context.Context, in *external.External, opts ...grpc.CallOption) (*external.External, error)
	UnaryParamsAny(ctx context.Context, in *UnaryRequestParamsAny, opts ...grpc.CallOption) (*UnaryResponseParamsAny, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (Test_ClientStreamClient, error)
	ServerStream(ctx context.Context, in *UnaryRequestParams, opts ...grpc.CallOption) (Test_ServerStreamClient, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (Test_StreamClient, 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.

func NewTestClient

func NewTestClient(cc grpc.ClientConnInterface) TestClient

type TestServer

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

type Test_ClientStreamClient

type Test_ClientStreamClient interface {
	Send(*UnaryRequestParams) error
	CloseAndRecv() (*UnaryResponseParams, error)
	grpc.ClientStream
}

type Test_ClientStreamServer

type Test_ClientStreamServer interface {
	SendAndClose(*UnaryResponseParams) error
	Recv() (*UnaryRequestParams, error)
	grpc.ServerStream
}

type Test_ServerStreamClient

type Test_ServerStreamClient interface {
	Recv() (*UnaryResponseParams, error)
	grpc.ClientStream
}

type Test_ServerStreamServer

type Test_ServerStreamServer interface {
	Send(*UnaryResponseParams) error
	grpc.ServerStream
}

type Test_StreamClient

type Test_StreamClient interface {
	Send(*UnaryRequestParams) error
	Recv() (*UnaryResponseParams, error)
	grpc.ClientStream
}

type Test_StreamServer

type Test_StreamServer interface {
	Send(*UnaryResponseParams) error
	Recv() (*UnaryRequestParams, error)
	grpc.ServerStream
}

type UnaryEmptyRequest

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

func (*UnaryEmptyRequest) Descriptor deprecated

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

Deprecated: Use UnaryEmptyRequest.ProtoReflect.Descriptor instead.

func (*UnaryEmptyRequest) ProtoMessage

func (*UnaryEmptyRequest) ProtoMessage()

func (*UnaryEmptyRequest) ProtoReflect

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

func (*UnaryEmptyRequest) Reset

func (x *UnaryEmptyRequest) Reset()

func (*UnaryEmptyRequest) String

func (x *UnaryEmptyRequest) String() string

type UnaryEmptyResponse

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

func (*UnaryEmptyResponse) Descriptor deprecated

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

Deprecated: Use UnaryEmptyResponse.ProtoReflect.Descriptor instead.

func (*UnaryEmptyResponse) ProtoMessage

func (*UnaryEmptyResponse) ProtoMessage()

func (*UnaryEmptyResponse) ProtoReflect

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

func (*UnaryEmptyResponse) Reset

func (x *UnaryEmptyResponse) Reset()

func (*UnaryEmptyResponse) String

func (x *UnaryEmptyResponse) String() string

type UnaryOneOfParamsMsg

type UnaryOneOfParamsMsg struct {

	// Types that are assignable to OneOf:
	//	*UnaryOneOfParamsMsg_String_
	//	*UnaryOneOfParamsMsg_Number
	OneOf isUnaryOneOfParamsMsg_OneOf `protobuf_oneof:"one_of"`
	// contains filtered or unexported fields
}

func (*UnaryOneOfParamsMsg) Descriptor deprecated

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

Deprecated: Use UnaryOneOfParamsMsg.ProtoReflect.Descriptor instead.

func (*UnaryOneOfParamsMsg) GetNumber

func (x *UnaryOneOfParamsMsg) GetNumber() int32

func (*UnaryOneOfParamsMsg) GetOneOf

func (m *UnaryOneOfParamsMsg) GetOneOf() isUnaryOneOfParamsMsg_OneOf

func (*UnaryOneOfParamsMsg) GetString_

func (x *UnaryOneOfParamsMsg) GetString_() string

func (*UnaryOneOfParamsMsg) ProtoMessage

func (*UnaryOneOfParamsMsg) ProtoMessage()

func (*UnaryOneOfParamsMsg) ProtoReflect

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

func (*UnaryOneOfParamsMsg) Reset

func (x *UnaryOneOfParamsMsg) Reset()

func (*UnaryOneOfParamsMsg) String

func (x *UnaryOneOfParamsMsg) String() string

type UnaryOneOfParamsMsg_Number

type UnaryOneOfParamsMsg_Number struct {
	Number int32 `protobuf:"varint,2,opt,name=number,proto3,oneof"`
}

type UnaryOneOfParamsMsg_String_

type UnaryOneOfParamsMsg_String_ struct {
	String_ string `protobuf:"bytes,1,opt,name=string,proto3,oneof"`
}

type UnaryRequestParams

type UnaryRequestParams struct {
	Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UnaryRequestParams) Descriptor deprecated

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

Deprecated: Use UnaryRequestParams.ProtoReflect.Descriptor instead.

func (*UnaryRequestParams) GetMsg

func (x *UnaryRequestParams) GetMsg() *Message

func (*UnaryRequestParams) ProtoMessage

func (*UnaryRequestParams) ProtoMessage()

func (*UnaryRequestParams) ProtoReflect

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

func (*UnaryRequestParams) Reset

func (x *UnaryRequestParams) Reset()

func (*UnaryRequestParams) String

func (x *UnaryRequestParams) String() string

type UnaryRequestParamsAny

type UnaryRequestParamsAny struct {
	Any     *anypb.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"`
	String_ *String    `protobuf:"bytes,2,opt,name=string,proto3,oneof" json:"string,omitempty"`
	Int64   *int64     `protobuf:"varint,3,opt,name=int64,proto3,oneof" json:"int64,omitempty"`
	// contains filtered or unexported fields
}

func (*UnaryRequestParamsAny) Descriptor deprecated

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

Deprecated: Use UnaryRequestParamsAny.ProtoReflect.Descriptor instead.

func (*UnaryRequestParamsAny) GetAny

func (x *UnaryRequestParamsAny) GetAny() *anypb.Any

func (*UnaryRequestParamsAny) GetInt64

func (x *UnaryRequestParamsAny) GetInt64() int64

func (*UnaryRequestParamsAny) GetString_

func (x *UnaryRequestParamsAny) GetString_() String

func (*UnaryRequestParamsAny) ProtoMessage

func (*UnaryRequestParamsAny) ProtoMessage()

func (*UnaryRequestParamsAny) ProtoReflect

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

func (*UnaryRequestParamsAny) Reset

func (x *UnaryRequestParamsAny) Reset()

func (*UnaryRequestParamsAny) String

func (x *UnaryRequestParamsAny) String() string

type UnaryResponseParams

type UnaryResponseParams struct {
	Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UnaryResponseParams) Descriptor deprecated

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

Deprecated: Use UnaryResponseParams.ProtoReflect.Descriptor instead.

func (*UnaryResponseParams) GetMsg

func (x *UnaryResponseParams) GetMsg() *Message

func (*UnaryResponseParams) ProtoMessage

func (*UnaryResponseParams) ProtoMessage()

func (*UnaryResponseParams) ProtoReflect

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

func (*UnaryResponseParams) Reset

func (x *UnaryResponseParams) Reset()

func (*UnaryResponseParams) String

func (x *UnaryResponseParams) String() string

type UnaryResponseParamsAny

type UnaryResponseParamsAny struct {
	Any     *anypb.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"`
	String_ *String    `protobuf:"bytes,2,opt,name=string,proto3,oneof" json:"string,omitempty"`
	Int64   *int64     `protobuf:"varint,3,opt,name=int64,proto3,oneof" json:"int64,omitempty"`
	// contains filtered or unexported fields
}

func (*UnaryResponseParamsAny) Descriptor deprecated

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

Deprecated: Use UnaryResponseParamsAny.ProtoReflect.Descriptor instead.

func (*UnaryResponseParamsAny) GetAny

func (x *UnaryResponseParamsAny) GetAny() *anypb.Any

func (*UnaryResponseParamsAny) GetInt64

func (x *UnaryResponseParamsAny) GetInt64() int64

func (*UnaryResponseParamsAny) GetString_

func (x *UnaryResponseParamsAny) GetString_() String

func (*UnaryResponseParamsAny) ProtoMessage

func (*UnaryResponseParamsAny) ProtoMessage()

func (*UnaryResponseParamsAny) ProtoReflect

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

func (*UnaryResponseParamsAny) Reset

func (x *UnaryResponseParamsAny) Reset()

func (*UnaryResponseParamsAny) String

func (x *UnaryResponseParamsAny) String() string

type UnimplementedTestServer

type UnimplementedTestServer struct {
}

UnimplementedTestServer must be embedded to have forward compatible implementations.

func (UnimplementedTestServer) ClientStream

func (UnimplementedTestServer) ServerStream

func (UnimplementedTestServer) Stream

func (UnimplementedTestServer) UnaryEmpty

func (UnimplementedTestServer) UnaryExternal

func (UnimplementedTestServer) UnaryOneOfParams

func (UnimplementedTestServer) UnaryParams

func (UnimplementedTestServer) UnaryParamsAny

func (UnimplementedTestServer) UnaryReqParams

func (UnimplementedTestServer) UnaryResParams

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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