Documentation ¶
Index ¶
- type User
- func (u *User) Create(db orm.DB, usr rest.User) (*rest.User, error)
- func (u *User) Delete(db orm.DB, usr *rest.User) error
- func (u *User) FindByToken(db orm.DB, token string) (*rest.User, error)
- func (u *User) FindByUsername(db orm.DB, uname string) (*rest.User, error)
- func (u *User) List(db orm.DB, lq *rest.ListQuery, p *rest.Pagination) ([]rest.User, error)
- func (u *User) Update(db orm.DB, usr *rest.User) error
- func (u *User) View(db orm.DB, id int) (*rest.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { CreateFn func(orm.DB, rest.User) (*rest.User, error) ViewFn func(orm.DB, int) (*rest.User, error) FindByUsernameFn func(orm.DB, string) (*rest.User, error) FindByTokenFn func(orm.DB, string) (*rest.User, error) ListFn func(orm.DB, *rest.ListQuery, *rest.Pagination) ([]rest.User, error) DeleteFn func(orm.DB, *rest.User) error UpdateFn func(orm.DB, *rest.User) error }
User database mock
func (*User) FindByToken ¶
FindByToken mock
func (*User) FindByUsername ¶
FindByUsername mock
Click to show internal directories.
Click to hide internal directories.