repository

package
v0.0.0-...-04b7820 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 5 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
}

func (*UserRepository) Create

func (a *UserRepository) Create(user *models.User) error

func (*UserRepository) Exists

func (a *UserRepository) Exists(id uuid.UUID) (bool, error)

func (*UserRepository) Find

func (a *UserRepository) Find(id uuid.UUID) (*models.User, error)

func (*UserRepository) FindByAccountType

func (a *UserRepository) FindByAccountType(value string) ([]*models.User, bool, error)

func (*UserRepository) FindByCondition

func (a *UserRepository) FindByCondition(condition, value string) (*models.User, bool, error)

func (*UserRepository) QueryWithArgs

func (a *UserRepository) QueryWithArgs(q string, args ...interface{}) ([]*models.User, error)

func (*UserRepository) RawCount

func (a *UserRepository) RawCount(q string, count *int64) error

func (*UserRepository) RawSmartSelect

func (a *UserRepository) RawSmartSelect(q string, res interface{}, args ...interface{}) error

func (*UserRepository) Save

func (a *UserRepository) Save(user *models.User) (*models.User, error)

func (*UserRepository) Where

func (a *UserRepository) Where(condition, value string) ([]*models.User, error)

type UserRepositoryInterface

type UserRepositoryInterface interface {
	Create(user *models.User) error
	Find(id uuid.UUID) (*models.User, error)
	Exists(id uuid.UUID) (bool, error)
	Where(condition, value string) ([]*models.User, error)
	FindByCondition(condition, value string) (*models.User, bool, error)
	FindByAccountType(value string) ([]*models.User, bool, error)
	RawSmartSelect(q string, res interface{}, args ...interface{}) error
	Save(user *models.User) (*models.User, error)
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) UserRepositoryInterface

Jump to

Keyboard shortcuts

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