repositories

package
v0.0.0-...-0d233d1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserReadRepository

type UserReadRepository interface {
	Login(string, string) *sql.Row
	ReadDB(int64) *sql.Row
	ReadAllDB() *sql.Rows
}

type UserReadWriteRepository

type UserReadWriteRepository interface {
	UserReadRepository
	UserWriteRepository
}

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *sql.DB) *UserRepository

func (*UserRepository) InsertDB

func (ur *UserRepository) InsertDB(user *users.User) (id int64, err error)

func (*UserRepository) Login

func (ur *UserRepository) Login(login, password string) *sql.Row

func (*UserRepository) ReadAllDB

func (ur *UserRepository) ReadAllDB() *sql.Rows

func (*UserRepository) ReadDB

func (ur *UserRepository) ReadDB(id int64) *sql.Row

func (*UserRepository) SoftDeleteDB

func (ur *UserRepository) SoftDeleteDB(id int64) error

func (*UserRepository) UpdateDB

func (ur *UserRepository) UpdateDB(id int64, user *users.User) (int64, error)

type UserWriteRepository

type UserWriteRepository interface {
	InsertDB(*users.User) (int64, error)
	UpdateDB(int64, *users.User) (int64, error)
	SoftDeleteDB(int64) error
}

Jump to

Keyboard shortcuts

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