Documentation ¶
Index ¶
- Variables
- type User
- func (u User) Create(db orm.DB, usr homeschooling.User) (homeschooling.User, error)
- func (u User) Delete(db orm.DB, user homeschooling.User) error
- func (u User) List(db orm.DB, qp *homeschooling.ListQuery, p homeschooling.Pagination) ([]homeschooling.User, error)
- func (u User) Update(db orm.DB, user homeschooling.User) error
- func (u User) View(db orm.DB, id int) (homeschooling.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyExists = echo.NewHTTPError(http.StatusInternalServerError, "Username or email already exists.")
)
Custom errors
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct{}
User represents the client for user table
func (User) Create ¶
func (u User) Create(db orm.DB, usr homeschooling.User) (homeschooling.User, error)
Create creates a new user on database
func (User) List ¶
func (u User) List(db orm.DB, qp *homeschooling.ListQuery, p homeschooling.Pagination) ([]homeschooling.User, error)
List returns list of all users retrievable for the current user, depending on role
Click to show internal directories.
Click to hide internal directories.