repository

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetUsersRepository

func SetUsersRepository(ur *UsersRepository)

Types

type UsersRepository

type UsersRepository struct {
	DB *sql.DB
}

func NewUsersRepository

func NewUsersRepository(db *sql.DB) *UsersRepository

func (*UsersRepository) GetAll

func (u *UsersRepository) GetAll() error

func (*UsersRepository) GetUserByName

func (u *UsersRepository) GetUserByName(username string) (models.User, bool)

func (*UsersRepository) SaveUser

func (u *UsersRepository) SaveUser(us models.User) error

type Worker

type Worker interface {
	SaveUser(models.User) error
	GetUserByName(username string) (models.User, bool)
}

func GetUsersRepository

func GetUsersRepository() Worker

Jump to

Keyboard shortcuts

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