Documentation
¶
Index ¶
- type AppLike
- type ContentService
- func (cs *ContentService) BulkDelete(c fs.Context, _ any) (int, error)
- func (cs *ContentService) BulkUpdate(c fs.Context, _ any) (int, error)
- func (cs *ContentService) Create(c fs.Context, _ any) (any, error)
- func (cs *ContentService) CreateResource(api *fs.Resource)
- func (cs *ContentService) Delete(c fs.Context, _ any) (any, error)
- func (cs *ContentService) Detail(c fs.Context, _ any) (*entity.Entity, error)
- func (cs *ContentService) List(c fs.Context, _ any) (*Pagination, error)
- func (cs *ContentService) Update(c fs.Context, _ any) (*entity.Entity, error)
- type Pagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentService ¶
func New ¶ added in v0.0.5
func New(app AppLike) *ContentService
func (*ContentService) BulkDelete ¶ added in v0.4.0
func (*ContentService) BulkUpdate ¶ added in v0.4.0
func (*ContentService) CreateResource ¶ added in v0.6.0
func (cs *ContentService) CreateResource(api *fs.Resource)
func (*ContentService) List ¶
func (cs *ContentService) List(c fs.Context, _ any) (*Pagination, error)
type Pagination ¶ added in v0.1.0
type Pagination struct {
Total uint `json:"total"`
PerPage uint `json:"per_page"`
CurrentPage uint `json:"current_page"`
LastPage uint `json:"last_page"`
Items []*entity.Entity `json:"items"`
}
Pagination is a struct that contains pagination info and the data
func NewPagination ¶ added in v0.1.0
func NewPagination(total, perPage, currentPage uint, items []*entity.Entity) *Pagination
NewPagination creates a new pagination struct
Click to show internal directories.
Click to hide internal directories.