psql

package
v0.0.0-...-7d85c2f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

UserRepository User Repository PostgreSQL implementation

func CreateUserRepository

func CreateUserRepository(db *gorm.DB) *UserRepository

CreateUserRepository PostgreSQL UserRepository constructor

func (*UserRepository) Create

func (r *UserRepository) Create(user *domain.User) error

Create creates a user

func (*UserRepository) Find

func (r *UserRepository) Find(id int) (*domain.User, error)

Find user by id

func (*UserRepository) FindAll

func (r *UserRepository) FindAll() []*domain.User

FindAll get all users

func (*UserRepository) FindByEmail

func (r *UserRepository) FindByEmail(email string) (*domain.User, error)

FindByEmail get user by email

Jump to

Keyboard shortcuts

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