Documentation
¶
Overview ¶
Package topic contains topic application services
Index ¶
- type RBAC
- type Securer
- type Service
- type Topic
- func (u *Topic) Create(c echo.Context, req model.Topic) (*model.Topic, error)
- func (u *Topic) Delete(c echo.Context, id int) error
- func (u *Topic) List(c echo.Context, p *model.Pagination, query []string) ([]model.Topic, int, error)
- func (u *Topic) Update(c echo.Context, req model.UpdateReq) (*model.Topic, error)
- func (u *Topic) View(c echo.Context, query []string) (*model.Topic, error)
- type UDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
Create(echo.Context, model.Topic) (*model.Topic, error)
List(echo.Context, *model.Pagination, []string) ([]model.Topic, int, error)
View(echo.Context, []string) (*model.Topic, error)
Delete(echo.Context, int) error
Update(echo.Context, model.UpdateReq) (*model.Topic, error)
}
Service represents topic application interface
type Topic ¶
type Topic struct {
// contains filtered or unexported fields
}
Topic represents topic application service
func Initialize ¶
Initialize initalizes Topic application service with defaults
func (*Topic) List ¶
func (u *Topic) List(c echo.Context, p *model.Pagination, query []string) ([]model.Topic, int, error)
List returns list of topics
type UDB ¶
type UDB interface {
Create(orm.DB, model.Topic) (*model.Topic, error)
View(orm.DB, *model.FilterQuery) (*model.Topic, error)
List(orm.DB, *model.FilterQuery, *model.Pagination) ([]model.Topic, int, error)
Update(orm.DB, *model.Topic) error
Delete(orm.DB, *model.Topic) error
}
UDB represents topic repository interface
Click to show internal directories.
Click to hide internal directories.