Documentation ¶
Index ¶
- func NewCatSevice(categoriesRepository repository.CategoriesRepository) pb.CatServiceServer
- type CatService
- func (s *CatService) AddURL(ctx context.Context, req *pb.AddURLRequest) (*pb.Category, error)
- func (s *CatService) DeleteURL(ctx context.Context, req *pb.DeleteURLRequest) (*pb.DeleteURLResponse, error)
- func (s *CatService) DeleteURLs(req *pb.DeleteURLsRequest, stream pb.CatService_DeleteURLsServer) error
- func (s *CatService) GetCategory(ctx context.Context, req *pb.GetCategoryRequest) (*pb.Category, error)
- func (s *CatService) ListURLs(req *pb.ListURLsRequest, stream pb.CatService_ListURLsServer) error
- func (s *CatService) ReportMiscategorization(ctx context.Context, req *pb.ReportMiscategorizationRequest) (*pb.Category, error)
- func (s *CatService) UpdateCategory(ctx context.Context, req *pb.UpdateCategoryRequest) (*pb.Category, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatSevice ¶
func NewCatSevice(categoriesRepository repository.CategoriesRepository) pb.CatServiceServer
NewCatService creates a new CatService instance.
Types ¶
type CatService ¶
type CatService struct {
// contains filtered or unexported fields
}
CatService provides categoriesRepository for categorization service.
func (*CatService) AddURL ¶
func (s *CatService) AddURL(ctx context.Context, req *pb.AddURLRequest) (*pb.Category, error)
AddURL performs the url add.
func (*CatService) DeleteURL ¶
func (s *CatService) DeleteURL(ctx context.Context, req *pb.DeleteURLRequest) (*pb.DeleteURLResponse, error)
DeleteURL performs the url delete.
func (*CatService) DeleteURLs ¶
func (s *CatService) DeleteURLs(req *pb.DeleteURLsRequest, stream pb.CatService_DeleteURLsServer) error
DeleteURLs performs delete the urls.
func (*CatService) GetCategory ¶
func (s *CatService) GetCategory(ctx context.Context, req *pb.GetCategoryRequest) (*pb.Category, error)
GetCategory performs return the category by url.
func (*CatService) ListURLs ¶
func (s *CatService) ListURLs(req *pb.ListURLsRequest, stream pb.CatService_ListURLsServer) error
ListURLs performs list the urls based on categories and count.
func (*CatService) ReportMiscategorization ¶
func (s *CatService) ReportMiscategorization(ctx context.Context, req *pb.ReportMiscategorizationRequest) (*pb.Category, error)
ReportMiscategorization reports miscategorization.
func (*CatService) UpdateCategory ¶
func (s *CatService) UpdateCategory(ctx context.Context, req *pb.UpdateCategoryRequest) (*pb.Category, error)
UpdateCategory performs the category update.
Click to show internal directories.
Click to hide internal directories.