repository

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Pool a repository pool to store all

Functions

This section is empty.

Types

type Repositories

type Repositories struct {
	// Information Module
	*UserRepository
}

Repositories struct for collect all app repositories.

type UserRepository

type UserRepository struct {
}

UserRepository struct for queries from a User model. The struct is an implementation of interface IUserRepository

func (*UserRepository) CreateUser

func (q *UserRepository) CreateUser(u *model.User) error

CreateUser a query for creating a new user by given user data.

func (*UserRepository) DeleteUser

func (q *UserRepository) DeleteUser(u *model.User) error

DeleteUser a query for updating a user by given user data.

func (*UserRepository) GetUserByEmail

func (q *UserRepository) GetUserByEmail(email string) *model.User

GetUserByEmail query for getting one User by given Email.

func (*UserRepository) GetUserByID

func (q *UserRepository) GetUserByID(id int) *model.User

GetUserByID query for getting one User by given ID.

func (*UserRepository) GetUserByToken

func (q *UserRepository) GetUserByToken(token string) *model.User

GetUserByToken query for getting one User by given Token.

func (*UserRepository) UpdateUser

func (q *UserRepository) UpdateUser(u *model.User) error

UpdateUser a query for updating a user by given user data.

Jump to

Keyboard shortcuts

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