Documentation
¶
Index ¶
- type AppLike
- type ContentService
- func (cs *ContentService) Create(c fs.Context, _ any) (*schema.Entity, error)
- func (cs *ContentService) Delete(c fs.Context, _ any) (any, error)
- func (cs *ContentService) Detail(c fs.Context, _ any) (*schema.Entity, error)
- func (cs *ContentService) List(c fs.Context, _ any) (*Pagination, error)
- func (cs *ContentService) Update(c fs.Context, _ any) (*schema.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) 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 []*schema.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 []*schema.Entity) *Pagination
NewPagination creates a new pagination struct
Click to show internal directories.
Click to hide internal directories.