pgsql

package
v0.0.0-...-53ec096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) Delete

func (u User) Delete(db orm.DB, user homeschooling.User) error

Delete sets deleted_at for a user

func (User) List

List returns list of all users retrievable for the current user, depending on role

func (User) Update

func (u User) Update(db orm.DB, user homeschooling.User) error

Update updates user's contact info

func (User) View

func (u User) View(db orm.DB, id int) (homeschooling.User, error)

View returns single user by ID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL