Documentation
¶
Index ¶
- type MySQL
- func (m *MySQL) Delete(ctx context.Context, isAdmin bool, user *entity.User) (err error)
- func (m *MySQL) GetByEmail(ctx context.Context, app int64, email string) (user *entity.User, err error)
- func (m *MySQL) GetByHash(ctx context.Context, app int64, all bool, isAdmin bool, uid string) (user *entity.User, err error)
- func (m *MySQL) GetByID(ctx context.Context, app int64, id int64, all bool, isAdmin bool, uid string) (user *entity.User, err error)
- func (m *MySQL) Insert(ctx context.Context, user *entity.User) (err error)
- func (m *MySQL) Select(ctx context.Context, app int64, all bool, isAdmin bool, uid string) (users entity.Users, err error)
- func (m *MySQL) Update(ctx context.Context, isAdmin bool, user *entity.User) (err error)
- type User
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL struct
func (*MySQL) GetByEmail ¶
func (m *MySQL) GetByEmail(ctx context.Context, app int64, email string) (user *entity.User, err error)
GetByEmail . . .
func (*MySQL) GetByHash ¶
func (m *MySQL) GetByHash(ctx context.Context, app int64, all bool, isAdmin bool, uid string) (user *entity.User, err error)
GetByID . . .
func (*MySQL) GetByID ¶
func (m *MySQL) GetByID(ctx context.Context, app int64, id int64, all bool, isAdmin bool, uid string) (user *entity.User, err error)
GetByID . . .
type User ¶
type User struct { ID int64 `db:"id"` Username string `db:"username"` Email string `db:"email"` Password string `db:"password"` UserHash string `db:"user_hash"` EmployeeID *int64 `db:"employee_id"` Scope string `db:"scope"` AppID int64 `db:"app_id"` CreatedAt null.Time `db:"created_at"` CreatedBy string `db:"created_by"` UpdatedAt null.Time `db:"updated_at"` LastUpdateBy *string `db:"last_update_by"` DeletedAt null.Time `db:"deleted_at"` IsActive int8 `db:"is_active"` }
User struct
Click to show internal directories.
Click to hide internal directories.