Documentation ¶
Index ¶
- type UserService
- func (us *UserService) DeleteUser(user models.User) error
- func (us *UserService) DeleteUserByID(id int64) error
- func (us *UserService) GetUser(id int64) (*utils.ResultTransformer, error)
- func (us *UserService) GetUsers() *utils.ResultTransformer
- func (us *UserService) InsertUser(user models.User) (int64, error)
- func (us *UserService) UpdateUser(user models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService struct
func NewUserService ¶
func NewUserService(db *sqlx.DB) *UserService
NewUserService return new UserService object
func (*UserService) DeleteUser ¶
func (us *UserService) DeleteUser(user models.User) error
DeleteUser delete user and get rows affected
func (*UserService) DeleteUserByID ¶ added in v0.1.2
func (us *UserService) DeleteUserByID(id int64) error
DeleteUserByID delete user by id and get rows affected
func (*UserService) GetUser ¶
func (us *UserService) GetUser(id int64) (*utils.ResultTransformer, error)
GetUser return user by id
func (*UserService) GetUsers ¶
func (us *UserService) GetUsers() *utils.ResultTransformer
GetUsers return all users
func (*UserService) InsertUser ¶
func (us *UserService) InsertUser(user models.User) (int64, error)
InsertUser insert new user and get last id
func (*UserService) UpdateUser ¶
func (us *UserService) UpdateUser(user models.User) error
UpdateUser update user and get rows affected
Click to show internal directories.
Click to hide internal directories.