service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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