Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet( New, NewService, )
Functions ¶
This section is empty.
Types ¶
type CreateForm ¶
type CreateForm struct { Username string `schema:"username"` Email string `schema:"email"` Password string `schema:"password"` State int `schema:"state"` Roles []string `schema:"roles[]"` }
func (*CreateForm) Validate ¶
func (f *CreateForm) Validate() error
type QueryParams ¶
type QueryParams struct { api.QueryParams Username string `json:"username"` Email string `json:"Email"` 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 New ¶
func New( app *api.Application, captchaManager *captchas.Manager, jwtManager *core.JWTManager, enforcer *casbin.Enforcer, service Service, ) *Resource
func (*Resource) RegisterRoutes ¶
type Service ¶
type Service interface { Count() (uint64, error) Query(limit, offset uint64, qps *QueryParams) ([]oldmodels.User, error) Create(form *CreateForm) (*models.User, error) }
func NewService ¶
Click to show internal directories.
Click to hide internal directories.