grpctest

package
Version: v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_resources_protobuf_service_proto protoreflect.FileDescriptor
View Source
var ItemService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpctest.ItemService",
	HandlerType: (*ItemServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetItem",
			Handler:    _ItemService_GetItem_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListItems",
			Handler:       _ItemService_ListItems_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "CreateItems",
			Handler:       _ItemService_CreateItems_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "TransformItems",
			Handler:       _ItemService_TransformItems_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "resources/protobuf/service.proto",
}

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

Functions

func RegisterItemServiceServer

func RegisterItemServiceServer(s grpc.ServiceRegistrar, srv ItemServiceServer)

Types

type CreateItemsResponse

type CreateItemsResponse struct {
	NumItems int64 `protobuf:"varint,1,opt,name=num_items,json=numItems,proto3" json:"num_items,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateItemsResponse) Descriptor deprecated

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

Deprecated: Use CreateItemsResponse.ProtoReflect.Descriptor instead.

func (*CreateItemsResponse) GetNumItems

func (x *CreateItemsResponse) GetNumItems() int64

func (*CreateItemsResponse) ProtoMessage

func (*CreateItemsResponse) ProtoMessage()

func (*CreateItemsResponse) ProtoReflect

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

func (*CreateItemsResponse) Reset

func (x *CreateItemsResponse) Reset()

func (*CreateItemsResponse) String

func (x *CreateItemsResponse) String() string

type GetItemRequest

type GetItemRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetItemRequest) Descriptor deprecated

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

Deprecated: Use GetItemRequest.ProtoReflect.Descriptor instead.

func (*GetItemRequest) GetId

func (x *GetItemRequest) GetId() int32

func (*GetItemRequest) ProtoMessage

func (*GetItemRequest) ProtoMessage()

func (*GetItemRequest) ProtoReflect

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

func (*GetItemRequest) Reset

func (x *GetItemRequest) Reset()

func (*GetItemRequest) String

func (x *GetItemRequest) String() string

type Item

type Item struct {
	Id         int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Locale     string                 `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"`
	Name       string                 `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetCreateTime

func (x *Item) GetCreateTime() *timestamppb.Timestamp

func (*Item) GetId

func (x *Item) GetId() int32

func (*Item) GetLocale

func (x *Item) GetLocale() string

func (*Item) GetName

func (x *Item) GetName() string

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 ItemServiceClient

type ItemServiceClient interface {
	GetItem(ctx context.Context, in *GetItemRequest, opts ...grpc.CallOption) (*Item, error)
	ListItems(ctx context.Context, in *ListItemsRequest, opts ...grpc.CallOption) (ItemService_ListItemsClient, error)
	CreateItems(ctx context.Context, opts ...grpc.CallOption) (ItemService_CreateItemsClient, error)
	TransformItems(ctx context.Context, opts ...grpc.CallOption) (ItemService_TransformItemsClient, error)
}

ItemServiceClient is the client API for ItemService 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 ItemServiceServer

type ItemServiceServer interface {
	GetItem(context.Context, *GetItemRequest) (*Item, error)
	ListItems(*ListItemsRequest, ItemService_ListItemsServer) error
	CreateItems(ItemService_CreateItemsServer) error
	TransformItems(ItemService_TransformItemsServer) error
	// contains filtered or unexported methods
}

ItemServiceServer is the server API for ItemService service. All implementations must embed UnimplementedItemServiceServer for forward compatibility

type ItemService_CreateItemsClient

type ItemService_CreateItemsClient interface {
	Send(*Item) error
	CloseAndRecv() (*CreateItemsResponse, error)
	grpc.ClientStream
}

type ItemService_CreateItemsServer

type ItemService_CreateItemsServer interface {
	SendAndClose(*CreateItemsResponse) error
	Recv() (*Item, error)
	grpc.ServerStream
}

type ItemService_ListItemsClient

type ItemService_ListItemsClient interface {
	Recv() (*Item, error)
	grpc.ClientStream
}

type ItemService_ListItemsServer

type ItemService_ListItemsServer interface {
	Send(*Item) error
	grpc.ServerStream
}

type ItemService_TransformItemsClient

type ItemService_TransformItemsClient interface {
	Send(*Item) error
	Recv() (*Item, error)
	grpc.ClientStream
}

type ItemService_TransformItemsServer

type ItemService_TransformItemsServer interface {
	Send(*Item) error
	Recv() (*Item, error)
	grpc.ServerStream
}

type ListItemsRequest

type ListItemsRequest struct {
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListItemsRequest) Descriptor deprecated

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

Deprecated: Use ListItemsRequest.ProtoReflect.Descriptor instead.

func (*ListItemsRequest) GetPageSize

func (x *ListItemsRequest) GetPageSize() int32

func (*ListItemsRequest) ProtoMessage

func (*ListItemsRequest) ProtoMessage()

func (*ListItemsRequest) ProtoReflect

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

func (*ListItemsRequest) Reset

func (x *ListItemsRequest) Reset()

func (*ListItemsRequest) String

func (x *ListItemsRequest) String() string

type UnimplementedItemServiceServer

type UnimplementedItemServiceServer struct {
}

UnimplementedItemServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedItemServiceServer) CreateItems

func (UnimplementedItemServiceServer) GetItem

func (UnimplementedItemServiceServer) ListItems

func (UnimplementedItemServiceServer) TransformItems

type UnsafeItemServiceServer

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

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

Jump to

Keyboard shortcuts

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