repository

package
v0.0.0-...-e4ef09c Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SELECT_USER_EMAIL = "SELECT id, name, age, password FROM users WHERE email = ?"
	SELECT_USER_ID    = "SELECT name, age, email, password FROM users WHERE id = ?"
	SELECT_USER_LOGIN = "SELECT id, name, age FROM users WHERE email = ? AND password = ?"
)
View Source
var (
	DELETE_USER = "DELETE FROM users WHERE id = ?"
)
View Source
var (
	INSERT_USER = "INSERT INTO users (id, name, email, password, age) VALUES (?, ?, ?, ?, ?)"
)
View Source
var (
	UPDATE_USER = "UPDATE users SET %s WHERE id = ?"
)

Functions

This section is empty.

Types

type UserRepository

type UserRepository interface {
	CreateUser(userDomain model.UserDomainInterface) (model.UserDomainInterface, *rest_err.RestErr)
	FindUserByEmail(email string) (model.UserDomainInterface, *rest_err.RestErr)
	FindUserById(userId string) (model.UserDomainInterface, *rest_err.RestErr)
	FindUserByLogin(email, password string) (model.UserDomainInterface, *rest_err.RestErr)
	UpdateUser(userId string, userDomain model.UserDomainInterface) *rest_err.RestErr
	DeleteUser(userId string) *rest_err.RestErr
}

func NewUserRepository

func NewUserRepository(database *sql.DB) UserRepository

Jump to

Keyboard shortcuts

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