Documentation ¶
Index ¶
- func Create(value interface{}) error
- func DeleteByID(model interface{}, id uint64) (count int64, err error)
- func DeleteByIDS(model interface{}, ids []uint64) (count int64, err error)
- func DeleteByModel(model interface{}) (count int64, err error)
- func DeleteByWhere(model, where interface{}) (count int64, err error)
- func Find(where interface{}, out interface{}, associations []string, orders ...string) error
- func First(where interface{}, out interface{}, associations []string) (notFound bool, err error)
- func FirstByID(out interface{}, id string) (notFound bool, err error)
- func Save(value interface{}) error
- func Scan(model, where interface{}, out interface{}) (notFound bool, err error)
- func ScanList(model, where interface{}, out interface{}, orders ...string) error
- func Updates(where interface{}, value interface{}) error
- type UserRepository
- func (r *UserRepository) Add(user *models.User) error
- func (r *UserRepository) All() (*[]models.User, error)
- func (r *UserRepository) Delete(user *models.User) error
- func (r *UserRepository) Get(id uint64) (*models.User, error)
- func (r *UserRepository) GetByUsername(username string) (*models.User, error)
- func (r *UserRepository) Query(q *models.User) (*[]models.User, error)
- func (r *UserRepository) Update(user *models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByIDS ¶
Delete
Types ¶
type UserRepository ¶
type UserRepository struct{}
func GetUserRepository ¶
func GetUserRepository() *UserRepository
func (*UserRepository) GetByUsername ¶
func (r *UserRepository) GetByUsername(username string) (*models.User, error)
Click to show internal directories.
Click to hide internal directories.