Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet( New, NewService, )
Functions ¶
This section is empty.
Types ¶
type Form ¶
type QueryParams ¶
type QueryParams struct {
api.QueryParams
Title string `json:"title"`
State string `json:"state"`
}
func (QueryParams) Validate ¶
func (qp QueryParams) Validate() error
type Resource ¶
type Resource struct {
*api.Application
// contains filtered or unexported fields
}
func (*Resource) RegisterRoutes ¶
type Service ¶
type Service interface {
Get(id int64) (*Post, error)
Create(*clevergo.Context) (*Post, error)
Count() (uint64, error)
Query(limit, offset uint64, qps *QueryParams) ([]models.Post, error)
Update(id int64, form *Form) (*Post, error)
Delete(id int64) error
}
func NewService ¶
func NewService(db *sqlex.DB, userManager *api.UserManager) Service
Click to show internal directories.
Click to hide internal directories.