Documentation
¶
Index ¶
- type Repository
- type Service
- func (s *Service) Create(ctx context.Context, createDTO *dto.CreateArticle) error
- func (s *Service) Delete(ctx context.Context, id uint) error
- func (s *Service) GenerateSlug(title string) (string, error)
- func (s *Service) GetBySlug(ctx context.Context, slug string) (*dto.Article, error)
- func (s *Service) Index(ctx context.Context, request *filter.Request) (*database.PaginatorDTO[*dto.Article], error)
- func (s *Service) IsOwner(ctx context.Context, resourceID, ownerID uint) (bool, error)
- func (s *Service) Name() string
- func (s *Service) Update(ctx context.Context, id uint, updateDTO *dto.UpdateArticle) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Index(ctx context.Context, request *filter.Request) (*database.Paginator[*model.Article], error) Create(ctx context.Context, article *model.Article) (*model.Article, error) Update(ctx context.Context, article *model.Article) (*model.Article, error) GetByID(ctx context.Context, id uint) (*model.Article, error) GetBySlug(ctx context.Context, slug string) (*model.Article, error) Delete(ctx context.Context, id uint) error IsOwner(ctx context.Context, resourceID, ownerID uint) (bool, error) }
Click to show internal directories.
Click to hide internal directories.