repositories

package
v0.0.0-...-226c3a4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type MysqlUsersRepository

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

func (*MysqlUsersRepository) Create

func (s *MysqlUsersRepository) Create(username, hash, salt, email string) (u *models.User, err error)

func (*MysqlUsersRepository) QueryAccount

func (s *MysqlUsersRepository) QueryAccount(username string) (u *models.User, err error)

func (*MysqlUsersRepository) QueryProfile

func (s *MysqlUsersRepository) QueryProfile(uid uint64) (p *models.Profile, err error)

func (*MysqlUsersRepository) UpdateAccount

func (s *MysqlUsersRepository) UpdateAccount(u *models.User) (err error)

func (*MysqlUsersRepository) UpdateProfile

func (s *MysqlUsersRepository) UpdateProfile(p *models.Profile) (err error)

type UsersRepository

type UsersRepository interface {
	Create(username, hash, salt, email string) (u *models.User, err error)
	UpdateProfile(p *models.Profile) (err error)
	UpdateAccount(u *models.User) (err error)
	QueryAccount(username string) (u *models.User, err error)
	QueryProfile(uid uint64) (p *models.Profile, err error)
}

func CreateDetailRepository

func CreateDetailRepository(f string) (UsersRepository, error)

func NewMysqlUsersRepository

func NewMysqlUsersRepository(logger *zap.Logger, db *gorm.DB) UsersRepository

Jump to

Keyboard shortcuts

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