db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqlHandler

type SqlHandler interface {
	Exec(string, ...interface{}) *gorm.DB
	Find(interface{}, ...interface{}) *gorm.DB
	First(interface{}, ...interface{}) *gorm.DB
	Raw(string, ...interface{}) *gorm.DB
	Create(interface{}) *gorm.DB
	Save(interface{}) *gorm.DB
	Delete(interface{}) *gorm.DB
	Where(interface{}, ...interface{}) *gorm.DB
}

type UserRepository

type UserRepository struct {
	SqlHandler
}

func (*UserRepository) DeleteById

func (repository *UserRepository) DeleteById(id uuid.UUID) (err error)

func (*UserRepository) FindAll

func (repository *UserRepository) FindAll() (users models.Users, err error)

func (*UserRepository) FindById

func (repository *UserRepository) FindById(id uuid.UUID) (user models.User, err error)

func (*UserRepository) Store

func (repository *UserRepository) Store(u models.User) (user models.User, err error)

func (*UserRepository) Update

func (repository *UserRepository) Update(id uuid.UUID, u models.User) (user models.User, err error)

Jump to

Keyboard shortcuts

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