Documentation ¶
Index ¶
- func Permission(ctx context.Context) map[string]storage.ResAct
- type CoreCategory
- type Svc
- func (s *Svc) CreateCategory(ctx context.Context, req *catG.CreateCategoryRequest) (*catG.CreateCategoryResponse, error)
- func (s *Svc) DeleteCategory(ctx context.Context, req *catG.DeleteCategoryRequest) (*emptypb.Empty, error)
- func (s *Svc) GetCategory(ctx context.Context, req *catG.GetCategoryRequest) (*catG.GetCategoryResponse, error)
- func (s *Svc) ListCategory(ctx context.Context, req *catG.ListCategoryRequest) (*catG.ListCategoryResponse, error)
- func (h *Svc) RegisterSvc(srv *grpc.Server) error
- func (s *Svc) UpdateCategory(ctx context.Context, req *catG.UpdateCategoryRequest) (*catG.UpdateCategoryResponse, error)
- func (s *Svc) ValidateRequestedData(ctx context.Context, req storage.Category, id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CoreCategory ¶
type CoreCategory interface { CreateCategory(context.Context, storage.Category) (string, error) GetCategoryByID(context.Context, string) (*storage.Category, error) UpdateCategory(context.Context, storage.Category) (*storage.Category, error) ListCategories(context.Context, storage.ListCategoryFilter) ([]storage.Category, error) DeleteCategory(context.Context, string, string) error }
type Svc ¶
type Svc struct { catG.UnimplementedCategoryServiceServer // contains filtered or unexported fields }
func (*Svc) CreateCategory ¶
func (s *Svc) CreateCategory(ctx context.Context, req *catG.CreateCategoryRequest) (*catG.CreateCategoryResponse, error)
func (*Svc) DeleteCategory ¶
func (*Svc) GetCategory ¶
func (s *Svc) GetCategory(ctx context.Context, req *catG.GetCategoryRequest) (*catG.GetCategoryResponse, error)
func (*Svc) ListCategory ¶
func (s *Svc) ListCategory(ctx context.Context, req *catG.ListCategoryRequest) (*catG.ListCategoryResponse, error)
func (*Svc) RegisterSvc ¶
// RegisterService with grpc server.
func (*Svc) UpdateCategory ¶
func (s *Svc) UpdateCategory(ctx context.Context, req *catG.UpdateCategoryRequest) (*catG.UpdateCategoryResponse, error)
Click to show internal directories.
Click to hide internal directories.