queries

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserQueries

type UserQueries struct {
	*sqlx.DB
}

UserQueries struct for queries from User model.

func (*UserQueries) CreateUser

func (q *UserQueries) CreateUser(u *models.User) error

CreateUser func for creating user by given User object.

func (*UserQueries) DeleteUser

func (q *UserQueries) DeleteUser(id uuid.UUID) error

DeleteUser func for delete user by given ID.

func (*UserQueries) GetUser

func (q *UserQueries) GetUser(id uuid.UUID) (models.User, error)

GetUser func for getting one user by given ID.

func (*UserQueries) GetUsers

func (q *UserQueries) GetUsers() ([]models.User, error)

GetUsers func for getting all users.

func (*UserQueries) UpdateUser

func (q *UserQueries) UpdateUser(u *models.User) error

UpdateUser func for updating user by given User object.

Jump to

Keyboard shortcuts

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