Documentation ¶
Index ¶
- type UserRepository
- func (a *UserRepository) Create(user *models.User) error
- func (a *UserRepository) Exists(id uuid.UUID) (bool, error)
- func (a *UserRepository) Find(id uuid.UUID) (*models.User, error)
- func (a *UserRepository) FindByAccountType(value string) ([]*models.User, bool, error)
- func (a *UserRepository) FindByCondition(condition, value string) (*models.User, bool, error)
- func (a *UserRepository) QueryWithArgs(q string, args ...interface{}) ([]*models.User, error)
- func (a *UserRepository) RawCount(q string, count *int64) error
- func (a *UserRepository) RawSmartSelect(q string, res interface{}, args ...interface{}) error
- func (a *UserRepository) Save(user *models.User) (*models.User, error)
- func (a *UserRepository) Where(condition, value string) ([]*models.User, error)
- type UserRepositoryInterface
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) FindByAccountType ¶
func (*UserRepository) FindByCondition ¶
func (*UserRepository) QueryWithArgs ¶
func (a *UserRepository) QueryWithArgs(q string, args ...interface{}) ([]*models.User, error)
func (*UserRepository) RawSmartSelect ¶
func (a *UserRepository) RawSmartSelect(q string, res interface{}, args ...interface{}) 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
Click to show internal directories.
Click to hide internal directories.