Documentation ¶
Index ¶
- Variables
- func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
- type CreateItemRequest
- type Filter
- type GetItemRequest
- func (*GetItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetItemRequest) GetFilter() *Filter
- func (x *GetItemRequest) GetName() string
- func (*GetItemRequest) ProtoMessage()
- func (x *GetItemRequest) ProtoReflect() protoreflect.Message
- func (x *GetItemRequest) Reset()
- func (x *GetItemRequest) String() string
- type Item
- type ItemKind
- type ListItemsResponse
- type TestClient
- type TestResponseBodyResponse
- func (*TestResponseBodyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TestResponseBodyResponse) GetResponse() *TestResponseBodyResponse_Response
- func (*TestResponseBodyResponse) ProtoMessage()
- func (x *TestResponseBodyResponse) ProtoReflect() protoreflect.Message
- func (x *TestResponseBodyResponse) Reset()
- func (x *TestResponseBodyResponse) String() string
- type TestResponseBodyResponse_Response
- func (*TestResponseBodyResponse_Response) Descriptor() ([]byte, []int)deprecated
- func (x *TestResponseBodyResponse_Response) GetName() string
- func (*TestResponseBodyResponse_Response) ProtoMessage()
- func (x *TestResponseBodyResponse_Response) ProtoReflect() protoreflect.Message
- func (x *TestResponseBodyResponse_Response) Reset()
- func (x *TestResponseBodyResponse_Response) String() string
- type TestServer
- type UnimplementedTestServer
- func (UnimplementedTestServer) CreateItem(context.Context, *CreateItemRequest) (*Item, error)
- func (UnimplementedTestServer) GetItem(context.Context, *GetItemRequest) (*Item, error)
- func (UnimplementedTestServer) ListItems(context.Context, *emptypb.Empty) (*ListItemsResponse, error)
- func (UnimplementedTestServer) TestResponseBody(context.Context, *emptypb.Empty) (*TestResponseBodyResponse, error)
- type UnsafeTestServer
Constants ¶
This section is empty.
Variables ¶
var ( ItemKind_name = map[int32]string{ 0: "ITEM_KIND_UNSPECIFIED", 1: "WIDGET", 2: "GADGET", } ItemKind_value = map[string]int32{ "ITEM_KIND_UNSPECIFIED": 0, "WIDGET": 1, "GADGET": 2, } )
Enum value maps for ItemKind.
var File_test_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ericchiang.protorest.internal.testservice.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetItem", Handler: _Test_GetItem_Handler, }, { MethodName: "CreateItem", Handler: _Test_CreateItem_Handler, }, { MethodName: "ListItems", Handler: _Test_ListItems_Handler, }, { MethodName: "TestResponseBody", Handler: _Test_TestResponseBody_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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 CreateItemRequest ¶
type CreateItemRequest struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*CreateItemRequest) Descriptor
deprecated
func (*CreateItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateItemRequest.ProtoReflect.Descriptor instead.
func (*CreateItemRequest) GetItem ¶
func (x *CreateItemRequest) GetItem() *Item
func (*CreateItemRequest) ProtoMessage ¶
func (*CreateItemRequest) ProtoMessage()
func (*CreateItemRequest) ProtoReflect ¶
func (x *CreateItemRequest) ProtoReflect() protoreflect.Message
func (*CreateItemRequest) Reset ¶
func (x *CreateItemRequest) Reset()
func (*CreateItemRequest) String ¶
func (x *CreateItemRequest) String() string
type Filter ¶
type Filter struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Kind ItemKind `protobuf:"varint,2,opt,name=kind,proto3,enum=ericchiang.protorest.internal.testservice.ItemKind" json:"kind,omitempty"` // contains filtered or unexported fields }
func (*Filter) Descriptor
deprecated
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) ProtoReflect ¶
func (x *Filter) ProtoReflect() protoreflect.Message
type GetItemRequest ¶
type GetItemRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
func (*GetItemRequest) Descriptor
deprecated
func (*GetItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetItemRequest.ProtoReflect.Descriptor instead.
func (*GetItemRequest) GetFilter ¶
func (x *GetItemRequest) GetFilter() *Filter
func (*GetItemRequest) GetName ¶
func (x *GetItemRequest) GetName() string
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 { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` Kind ItemKind `protobuf:"varint,3,opt,name=kind,proto3,enum=ericchiang.protorest.internal.testservice.ItemKind" json:"kind,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type ItemKind ¶
type ItemKind int32
func (ItemKind) Descriptor ¶
func (ItemKind) Descriptor() protoreflect.EnumDescriptor
func (ItemKind) EnumDescriptor
deprecated
func (ItemKind) Number ¶
func (x ItemKind) Number() protoreflect.EnumNumber
func (ItemKind) Type ¶
func (ItemKind) Type() protoreflect.EnumType
type ListItemsResponse ¶
type ListItemsResponse struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ListItemsResponse) Descriptor
deprecated
func (*ListItemsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListItemsResponse.ProtoReflect.Descriptor instead.
func (*ListItemsResponse) GetItems ¶
func (x *ListItemsResponse) GetItems() []*Item
func (*ListItemsResponse) ProtoMessage ¶
func (*ListItemsResponse) ProtoMessage()
func (*ListItemsResponse) ProtoReflect ¶
func (x *ListItemsResponse) ProtoReflect() protoreflect.Message
func (*ListItemsResponse) Reset ¶
func (x *ListItemsResponse) Reset()
func (*ListItemsResponse) String ¶
func (x *ListItemsResponse) String() string
type TestClient ¶
type TestClient interface { GetItem(ctx context.Context, in *GetItemRequest, opts ...grpc.CallOption) (*Item, error) CreateItem(ctx context.Context, in *CreateItemRequest, opts ...grpc.CallOption) (*Item, error) ListItems(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListItemsResponse, error) TestResponseBody(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TestResponseBodyResponse, 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 TestResponseBodyResponse ¶
type TestResponseBodyResponse struct { Response *TestResponseBodyResponse_Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*TestResponseBodyResponse) Descriptor
deprecated
func (*TestResponseBodyResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestResponseBodyResponse.ProtoReflect.Descriptor instead.
func (*TestResponseBodyResponse) GetResponse ¶
func (x *TestResponseBodyResponse) GetResponse() *TestResponseBodyResponse_Response
func (*TestResponseBodyResponse) ProtoMessage ¶
func (*TestResponseBodyResponse) ProtoMessage()
func (*TestResponseBodyResponse) ProtoReflect ¶
func (x *TestResponseBodyResponse) ProtoReflect() protoreflect.Message
func (*TestResponseBodyResponse) Reset ¶
func (x *TestResponseBodyResponse) Reset()
func (*TestResponseBodyResponse) String ¶
func (x *TestResponseBodyResponse) String() string
type TestResponseBodyResponse_Response ¶
type TestResponseBodyResponse_Response struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*TestResponseBodyResponse_Response) Descriptor
deprecated
func (*TestResponseBodyResponse_Response) Descriptor() ([]byte, []int)
Deprecated: Use TestResponseBodyResponse_Response.ProtoReflect.Descriptor instead.
func (*TestResponseBodyResponse_Response) GetName ¶
func (x *TestResponseBodyResponse_Response) GetName() string
func (*TestResponseBodyResponse_Response) ProtoMessage ¶
func (*TestResponseBodyResponse_Response) ProtoMessage()
func (*TestResponseBodyResponse_Response) ProtoReflect ¶
func (x *TestResponseBodyResponse_Response) ProtoReflect() protoreflect.Message
func (*TestResponseBodyResponse_Response) Reset ¶
func (x *TestResponseBodyResponse_Response) Reset()
func (*TestResponseBodyResponse_Response) String ¶
func (x *TestResponseBodyResponse_Response) String() string
type TestServer ¶
type TestServer interface { GetItem(context.Context, *GetItemRequest) (*Item, error) CreateItem(context.Context, *CreateItemRequest) (*Item, error) ListItems(context.Context, *emptypb.Empty) (*ListItemsResponse, error) TestResponseBody(context.Context, *emptypb.Empty) (*TestResponseBodyResponse, error) // contains filtered or unexported methods }
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility
type UnimplementedTestServer ¶
type UnimplementedTestServer struct { }
UnimplementedTestServer must be embedded to have forward compatible implementations.
func (UnimplementedTestServer) CreateItem ¶
func (UnimplementedTestServer) CreateItem(context.Context, *CreateItemRequest) (*Item, error)
func (UnimplementedTestServer) GetItem ¶
func (UnimplementedTestServer) GetItem(context.Context, *GetItemRequest) (*Item, error)
func (UnimplementedTestServer) ListItems ¶
func (UnimplementedTestServer) ListItems(context.Context, *emptypb.Empty) (*ListItemsResponse, error)
func (UnimplementedTestServer) TestResponseBody ¶
func (UnimplementedTestServer) TestResponseBody(context.Context, *emptypb.Empty) (*TestResponseBodyResponse, error)
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.