Documentation ¶
Index ¶
- Variables
- func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)
- type Blank
- type Category
- func (*Category) Descriptor() ([]byte, []int)deprecated
- func (x *Category) GetDescription() string
- func (x *Category) GetId() string
- func (x *Category) GetName() string
- func (*Category) ProtoMessage()
- func (x *Category) ProtoReflect() protoreflect.Message
- func (x *Category) Reset()
- func (x *Category) String() string
- type CategoryGetRequest
- type CategoryList
- type CategoryServiceClient
- type CategoryServiceServer
- type CategoryService_CreateCategoryStreamBidirectionalClient
- type CategoryService_CreateCategoryStreamBidirectionalServer
- type CategoryService_CreateCategoryStreamClient
- type CategoryService_CreateCategoryStreamServer
- type CreateCategoryRequest
- func (*CreateCategoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCategoryRequest) GetDescription() string
- func (x *CreateCategoryRequest) GetName() string
- func (*CreateCategoryRequest) ProtoMessage()
- func (x *CreateCategoryRequest) ProtoReflect() protoreflect.Message
- func (x *CreateCategoryRequest) Reset()
- func (x *CreateCategoryRequest) String() string
- type UnimplementedCategoryServiceServer
- func (UnimplementedCategoryServiceServer) CreateCategory(context.Context, *CreateCategoryRequest) (*Category, error)
- func (UnimplementedCategoryServiceServer) CreateCategoryStream(CategoryService_CreateCategoryStreamServer) error
- func (UnimplementedCategoryServiceServer) CreateCategoryStreamBidirectional(CategoryService_CreateCategoryStreamBidirectionalServer) error
- func (UnimplementedCategoryServiceServer) GetCategory(context.Context, *CategoryGetRequest) (*Category, error)
- func (UnimplementedCategoryServiceServer) ListCategories(context.Context, *Blank) (*CategoryList, error)
- type UnsafeCategoryServiceServer
Constants ¶
This section is empty.
Variables ¶
var CategoryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.CategoryService", HandlerType: (*CategoryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCategory", Handler: _CategoryService_CreateCategory_Handler, }, { MethodName: "ListCategories", Handler: _CategoryService_ListCategories_Handler, }, { MethodName: "GetCategory", Handler: _CategoryService_GetCategory_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "CreateCategoryStream", Handler: _CategoryService_CreateCategoryStream_Handler, ClientStreams: true, }, { StreamName: "CreateCategoryStreamBidirectional", Handler: _CategoryService_CreateCategoryStreamBidirectional_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/course_category.proto", }
CategoryService_ServiceDesc is the grpc.ServiceDesc for CategoryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_course_category_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCategoryServiceServer ¶
func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)
Types ¶
type Blank ¶
type Blank struct {
// contains filtered or unexported fields
}
func (*Blank) Descriptor
deprecated
func (*Blank) ProtoMessage ¶
func (*Blank) ProtoMessage()
func (*Blank) ProtoReflect ¶
func (x *Blank) ProtoReflect() protoreflect.Message
type Category ¶
type Category struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*Category) Descriptor
deprecated
func (*Category) GetDescription ¶
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶
func (x *Category) ProtoReflect() protoreflect.Message
type CategoryGetRequest ¶
type CategoryGetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CategoryGetRequest) Descriptor
deprecated
func (*CategoryGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use CategoryGetRequest.ProtoReflect.Descriptor instead.
func (*CategoryGetRequest) GetId ¶
func (x *CategoryGetRequest) GetId() string
func (*CategoryGetRequest) ProtoMessage ¶
func (*CategoryGetRequest) ProtoMessage()
func (*CategoryGetRequest) ProtoReflect ¶
func (x *CategoryGetRequest) ProtoReflect() protoreflect.Message
func (*CategoryGetRequest) Reset ¶
func (x *CategoryGetRequest) Reset()
func (*CategoryGetRequest) String ¶
func (x *CategoryGetRequest) String() string
type CategoryList ¶
type CategoryList struct { Categories []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
func (*CategoryList) Descriptor
deprecated
func (*CategoryList) Descriptor() ([]byte, []int)
Deprecated: Use CategoryList.ProtoReflect.Descriptor instead.
func (*CategoryList) GetCategories ¶
func (x *CategoryList) GetCategories() []*Category
func (*CategoryList) ProtoMessage ¶
func (*CategoryList) ProtoMessage()
func (*CategoryList) ProtoReflect ¶
func (x *CategoryList) ProtoReflect() protoreflect.Message
func (*CategoryList) Reset ¶
func (x *CategoryList) Reset()
func (*CategoryList) String ¶
func (x *CategoryList) String() string
type CategoryServiceClient ¶
type CategoryServiceClient interface { CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*Category, error) CreateCategoryStream(ctx context.Context, opts ...grpc.CallOption) (CategoryService_CreateCategoryStreamClient, error) CreateCategoryStreamBidirectional(ctx context.Context, opts ...grpc.CallOption) (CategoryService_CreateCategoryStreamBidirectionalClient, error) ListCategories(ctx context.Context, in *Blank, opts ...grpc.CallOption) (*CategoryList, error) GetCategory(ctx context.Context, in *CategoryGetRequest, opts ...grpc.CallOption) (*Category, error) }
CategoryServiceClient is the client API for CategoryService 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 NewCategoryServiceClient ¶
func NewCategoryServiceClient(cc grpc.ClientConnInterface) CategoryServiceClient
type CategoryServiceServer ¶
type CategoryServiceServer interface { CreateCategory(context.Context, *CreateCategoryRequest) (*Category, error) CreateCategoryStream(CategoryService_CreateCategoryStreamServer) error CreateCategoryStreamBidirectional(CategoryService_CreateCategoryStreamBidirectionalServer) error ListCategories(context.Context, *Blank) (*CategoryList, error) GetCategory(context.Context, *CategoryGetRequest) (*Category, error) // contains filtered or unexported methods }
CategoryServiceServer is the server API for CategoryService service. All implementations must embed UnimplementedCategoryServiceServer for forward compatibility
type CategoryService_CreateCategoryStreamBidirectionalClient ¶
type CategoryService_CreateCategoryStreamBidirectionalClient interface { Send(*CreateCategoryRequest) error Recv() (*Category, error) grpc.ClientStream }
type CategoryService_CreateCategoryStreamBidirectionalServer ¶
type CategoryService_CreateCategoryStreamBidirectionalServer interface { Send(*Category) error Recv() (*CreateCategoryRequest, error) grpc.ServerStream }
type CategoryService_CreateCategoryStreamClient ¶
type CategoryService_CreateCategoryStreamClient interface { Send(*CreateCategoryRequest) error CloseAndRecv() (*CategoryList, error) grpc.ClientStream }
type CategoryService_CreateCategoryStreamServer ¶
type CategoryService_CreateCategoryStreamServer interface { SendAndClose(*CategoryList) error Recv() (*CreateCategoryRequest, error) grpc.ServerStream }
type CreateCategoryRequest ¶
type CreateCategoryRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*CreateCategoryRequest) Descriptor
deprecated
func (*CreateCategoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCategoryRequest.ProtoReflect.Descriptor instead.
func (*CreateCategoryRequest) GetDescription ¶
func (x *CreateCategoryRequest) GetDescription() string
func (*CreateCategoryRequest) GetName ¶
func (x *CreateCategoryRequest) GetName() string
func (*CreateCategoryRequest) ProtoMessage ¶
func (*CreateCategoryRequest) ProtoMessage()
func (*CreateCategoryRequest) ProtoReflect ¶
func (x *CreateCategoryRequest) ProtoReflect() protoreflect.Message
func (*CreateCategoryRequest) Reset ¶
func (x *CreateCategoryRequest) Reset()
func (*CreateCategoryRequest) String ¶
func (x *CreateCategoryRequest) String() string
type UnimplementedCategoryServiceServer ¶
type UnimplementedCategoryServiceServer struct { }
UnimplementedCategoryServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCategoryServiceServer) CreateCategory ¶
func (UnimplementedCategoryServiceServer) CreateCategory(context.Context, *CreateCategoryRequest) (*Category, error)
func (UnimplementedCategoryServiceServer) CreateCategoryStream ¶
func (UnimplementedCategoryServiceServer) CreateCategoryStream(CategoryService_CreateCategoryStreamServer) error
func (UnimplementedCategoryServiceServer) CreateCategoryStreamBidirectional ¶
func (UnimplementedCategoryServiceServer) CreateCategoryStreamBidirectional(CategoryService_CreateCategoryStreamBidirectionalServer) error
func (UnimplementedCategoryServiceServer) GetCategory ¶
func (UnimplementedCategoryServiceServer) GetCategory(context.Context, *CategoryGetRequest) (*Category, error)
func (UnimplementedCategoryServiceServer) ListCategories ¶
func (UnimplementedCategoryServiceServer) ListCategories(context.Context, *Blank) (*CategoryList, error)
type UnsafeCategoryServiceServer ¶
type UnsafeCategoryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCategoryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CategoryServiceServer will result in compilation errors.