test

package
v0.0.0-...-344c929 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestEnum_name = map[int32]string{
		0: "UNIVERSAL",
		1: "WEB",
		2: "IMAGES",
		3: "LOCAL",
		4: "NEWS",
		5: "PRODUCTS",
		6: "VIDEO",
	}
	TestEnum_value = map[string]int32{
		"UNIVERSAL": 0,
		"WEB":       1,
		"IMAGES":    2,
		"LOCAL":     3,
		"NEWS":      4,
		"PRODUCTS":  5,
		"VIDEO":     6,
	}
)

Enum value maps for TestEnum.

View Source
var (
	DeleteRequest_Corpus_name = map[int32]string{
		0: "UNIVERSAL",
		1: "WEB",
		2: "IMAGES",
		3: "LOCAL",
		4: "NEWS",
		5: "PRODUCTS",
		6: "VIDEO",
	}
	DeleteRequest_Corpus_value = map[string]int32{
		"UNIVERSAL": 0,
		"WEB":       1,
		"IMAGES":    2,
		"LOCAL":     3,
		"NEWS":      4,
		"PRODUCTS":  5,
		"VIDEO":     6,
	}
)

Enum value maps for DeleteRequest_Corpus.

View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Insert",
			Handler:    _Wallet_Insert_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Wallet_Delete_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ClientStream",
			Handler:       _Wallet_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ServerStream",
			Handler:       _Wallet_ServerStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BidiStream",
			Handler:       _Wallet_BidiStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "test.proto",
}

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

Functions

func RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

Types

type BidiStreamRequest

type BidiStreamRequest struct {
	Stroke int64 `protobuf:"varint,1,opt,name=stroke,proto3" json:"stroke,omitempty"`
	// contains filtered or unexported fields
}

func (*BidiStreamRequest) Descriptor deprecated

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

Deprecated: Use BidiStreamRequest.ProtoReflect.Descriptor instead.

func (*BidiStreamRequest) GetStroke

func (x *BidiStreamRequest) GetStroke() int64

func (*BidiStreamRequest) ProtoMessage

func (*BidiStreamRequest) ProtoMessage()

func (*BidiStreamRequest) ProtoReflect

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

func (*BidiStreamRequest) Reset

func (x *BidiStreamRequest) Reset()

func (*BidiStreamRequest) String

func (x *BidiStreamRequest) String() string

type BidiStreamResponse

type BidiStreamResponse struct {
	Stroke int64 `protobuf:"varint,1,opt,name=stroke,proto3" json:"stroke,omitempty"`
	// contains filtered or unexported fields
}

func (*BidiStreamResponse) Descriptor deprecated

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

Deprecated: Use BidiStreamResponse.ProtoReflect.Descriptor instead.

func (*BidiStreamResponse) GetStroke

func (x *BidiStreamResponse) GetStroke() int64

func (*BidiStreamResponse) ProtoMessage

func (*BidiStreamResponse) ProtoMessage()

func (*BidiStreamResponse) ProtoReflect

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

func (*BidiStreamResponse) Reset

func (x *BidiStreamResponse) Reset()

func (*BidiStreamResponse) String

func (x *BidiStreamResponse) String() string

type ClientImpl

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

func NewWalletClientImpl

func NewWalletClientImpl(logger log.Logger) *ClientImpl

func (*ClientImpl) BidiStream

func (n *ClientImpl) BidiStream(ctx context.Context) (Wallet_BidiStreamClient, error)

BidiStream

func (*ClientImpl) ClientStream

func (n *ClientImpl) ClientStream(ctx context.Context) (Wallet_BidiStreamClient, error)

ClientStream

func (*ClientImpl) Delete

func (n *ClientImpl) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete

func (*ClientImpl) Insert

func (n *ClientImpl) Insert(ctx context.Context, req *InsertRequest) (*InsertResponse, error)

Insert insert 234124321 adasda frtgrt asdad

func (*ClientImpl) ServerStream

ServerStream

type ClientStreamRequest

type ClientStreamRequest struct {
	Stroke int64 `protobuf:"varint,1,opt,name=stroke,proto3" json:"stroke,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamRequest) Descriptor deprecated

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

Deprecated: Use ClientStreamRequest.ProtoReflect.Descriptor instead.

func (*ClientStreamRequest) GetStroke

func (x *ClientStreamRequest) GetStroke() int64

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 {
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamResponse) Descriptor deprecated

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

Deprecated: Use ClientStreamResponse.ProtoReflect.Descriptor instead.

func (*ClientStreamResponse) GetCount

func (x *ClientStreamResponse) GetCount() int64

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 DeleteRequest

type DeleteRequest struct {
	Id     []string             `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
	Corpus DeleteRequest_Corpus `protobuf:"varint,4,opt,name=corpus,proto3,enum=test.DeleteRequest_Corpus" json:"corpus,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetCorpus

func (x *DeleteRequest) GetCorpus() DeleteRequest_Corpus

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() []string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteRequest_Corpus

type DeleteRequest_Corpus int32
const (
	DeleteRequest_UNIVERSAL DeleteRequest_Corpus = 0
	DeleteRequest_WEB       DeleteRequest_Corpus = 1
	DeleteRequest_IMAGES    DeleteRequest_Corpus = 2
	DeleteRequest_LOCAL     DeleteRequest_Corpus = 3
	DeleteRequest_NEWS      DeleteRequest_Corpus = 4
	DeleteRequest_PRODUCTS  DeleteRequest_Corpus = 5
	DeleteRequest_VIDEO     DeleteRequest_Corpus = 6
)

func (DeleteRequest_Corpus) Descriptor

func (DeleteRequest_Corpus) Enum

func (DeleteRequest_Corpus) EnumDescriptor deprecated

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

Deprecated: Use DeleteRequest_Corpus.Descriptor instead.

func (DeleteRequest_Corpus) Number

func (DeleteRequest_Corpus) String

func (x DeleteRequest_Corpus) String() string

func (DeleteRequest_Corpus) Type

type DeleteResponse

type DeleteResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetCode

func (x *DeleteResponse) GetCode() int32

func (*DeleteResponse) GetMsg

func (x *DeleteResponse) GetMsg() string

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type InsertRequest

type InsertRequest struct {
	Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*InsertRequest) Descriptor deprecated

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

Deprecated: Use InsertRequest.ProtoReflect.Descriptor instead.

func (*InsertRequest) GetItem

func (x *InsertRequest) GetItem() *Item

func (*InsertRequest) ProtoMessage

func (*InsertRequest) ProtoMessage()

func (*InsertRequest) ProtoReflect

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

func (*InsertRequest) Reset

func (x *InsertRequest) Reset()

func (*InsertRequest) String

func (x *InsertRequest) String() string

type InsertResponse

type InsertResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*InsertResponse) Descriptor deprecated

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

Deprecated: Use InsertResponse.ProtoReflect.Descriptor instead.

func (*InsertResponse) GetCode

func (x *InsertResponse) GetCode() int32

func (*InsertResponse) GetMsg

func (x *InsertResponse) GetMsg() string

func (*InsertResponse) ProtoMessage

func (*InsertResponse) ProtoMessage()

func (*InsertResponse) ProtoReflect

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

func (*InsertResponse) Reset

func (x *InsertResponse) Reset()

func (*InsertResponse) String

func (x *InsertResponse) String() string

type Item

type Item struct {
	UserId *string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
	Id     string    `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Val    *TestEnum `protobuf:"varint,3,opt,name=val,proto3,enum=test.TestEnum,oneof" json:"val,omitempty"`
	Val2   TestEnum  `protobuf:"varint,4,opt,name=val2,proto3,enum=test.TestEnum" json:"val2,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetUserId

func (x *Item) GetUserId() string

func (*Item) GetVal

func (x *Item) GetVal() TestEnum

func (*Item) GetVal2

func (x *Item) GetVal2() TestEnum

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type ServerStreamRequest

type ServerStreamRequest struct {
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerStreamRequest) Descriptor deprecated

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

Deprecated: Use ServerStreamRequest.ProtoReflect.Descriptor instead.

func (*ServerStreamRequest) GetCount

func (x *ServerStreamRequest) GetCount() int64

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 {
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerStreamResponse) Descriptor deprecated

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

Deprecated: Use ServerStreamResponse.ProtoReflect.Descriptor instead.

func (*ServerStreamResponse) GetCount

func (x *ServerStreamResponse) GetCount() int64

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 TestEnum

type TestEnum int32
const (
	TestEnum_UNIVERSAL TestEnum = 0
	TestEnum_WEB       TestEnum = 1
	TestEnum_IMAGES    TestEnum = 2
	TestEnum_LOCAL     TestEnum = 3
	TestEnum_NEWS      TestEnum = 4
	TestEnum_PRODUCTS  TestEnum = 5
	TestEnum_VIDEO     TestEnum = 6
)

func (TestEnum) Descriptor

func (TestEnum) Descriptor() protoreflect.EnumDescriptor

func (TestEnum) Enum

func (x TestEnum) Enum() *TestEnum

func (TestEnum) EnumDescriptor deprecated

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

Deprecated: Use TestEnum.Descriptor instead.

func (TestEnum) Number

func (x TestEnum) Number() protoreflect.EnumNumber

func (TestEnum) String

func (x TestEnum) String() string

func (TestEnum) Type

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) BidiStream

func (UnimplementedWalletServer) ClientStream

func (UnimplementedWalletServer) Delete

func (UnimplementedWalletServer) Insert

func (UnimplementedWalletServer) ServerStream

type UnsafeWalletServer

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

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

type WalletClient

type WalletClient interface {
	// insert 234124321
	// adasda
	// frtgrt
	// asdad
	Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (Wallet_ClientStreamClient, error)
	ServerStream(ctx context.Context, in *ServerStreamRequest, opts ...grpc.CallOption) (Wallet_ServerStreamClient, error)
	BidiStream(ctx context.Context, opts ...grpc.CallOption) (Wallet_BidiStreamClient, error)
}

WalletClient is the client API for Wallet 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 NewWalletClient

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletHandler

type WalletHandler struct {
	pb.UnimplementedWalletServer
}

func (*WalletHandler) BidiStream

func (e *WalletHandler) BidiStream(stream pb.Wallet_BidiStreamServer) error

func (*WalletHandler) ClientStream

func (e *WalletHandler) ClientStream(stream pb.Wallet_ClientStreamServer) error

func (*WalletHandler) Delete

func (*WalletHandler) Insert

insert 234124321 adasda frtgrt asdad

func (*WalletHandler) ServerStream

func (e *WalletHandler) ServerStream(req *pb.ServerStreamRequest, stream pb.Wallet_ServerStreamServer) error

type WalletServer

type WalletServer interface {
	// insert 234124321
	// adasda
	// frtgrt
	// asdad
	Insert(context.Context, *InsertRequest) (*InsertResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	ClientStream(Wallet_ClientStreamServer) error
	ServerStream(*ServerStreamRequest, Wallet_ServerStreamServer) error
	BidiStream(Wallet_BidiStreamServer) error
	// contains filtered or unexported methods
}

WalletServer is the server API for Wallet service. All implementations must embed UnimplementedWalletServer for forward compatibility

type Wallet_BidiStreamClient

type Wallet_BidiStreamClient interface {
	Send(*BidiStreamRequest) error
	Recv() (*BidiStreamResponse, error)
	grpc.ClientStream
}

type Wallet_BidiStreamServer

type Wallet_BidiStreamServer interface {
	Send(*BidiStreamResponse) error
	Recv() (*BidiStreamRequest, error)
	grpc.ServerStream
}

type Wallet_ClientStreamClient

type Wallet_ClientStreamClient interface {
	Send(*ClientStreamRequest) error
	CloseAndRecv() (*ClientStreamResponse, error)
	grpc.ClientStream
}

type Wallet_ClientStreamServer

type Wallet_ClientStreamServer interface {
	SendAndClose(*ClientStreamResponse) error
	Recv() (*ClientStreamRequest, error)
	grpc.ServerStream
}

type Wallet_ServerStreamClient

type Wallet_ServerStreamClient interface {
	Recv() (*ServerStreamResponse, error)
	grpc.ClientStream
}

type Wallet_ServerStreamServer

type Wallet_ServerStreamServer interface {
	Send(*ServerStreamResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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