Documentation ¶
Index ¶
- type User
- func (y *User) AuthExistUsername(username string) bool
- func (y *User) AuthWithPassword(res UserResponse, password string) bool
- func (y *User) Create(u UserCreateRequest) (id int64, err error)
- func (y *User) FindAll(page, limit int) (res []UserResponse, err error)
- func (y *User) FindById(id int) (res UserResponse, err error)
- func (y *User) FindByUsername(username string) (res UserResponse, err error)
- func (y *User) FindFirst() (res UserResponse, err error)
- func (y *User) FindLast() (res UserResponse, err error)
- func (y *User) UpdateDisableAccount(id int, description string) (err error)
- func (y *User) UpdateEnableAccount(id int) (err error)
- func (y *User) UpdateLevelUser(id, level int) (err error)
- func (y *User) UpdatePassword(id int, password string) (err error)
- type UserCreateRequest
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
func (*User) AuthExistUsername ¶
func (*User) AuthWithPassword ¶
func (y *User) AuthWithPassword(res UserResponse, password string) bool
func (*User) FindByUsername ¶
func (y *User) FindByUsername(username string) (res UserResponse, err error)
func (*User) FindFirst ¶
func (y *User) FindFirst() (res UserResponse, err error)
func (*User) FindLast ¶
func (y *User) FindLast() (res UserResponse, err error)
func (*User) UpdateDisableAccount ¶
func (*User) UpdateEnableAccount ¶
func (*User) UpdateLevelUser ¶
type UserCreateRequest ¶
type UserResponse ¶
type UserResponse struct { Id int `json:"id" db:"id"` Username string `json:"username" db:"username"` Password string `json:"-" db:"password"` Active bool `json:"active" db:"active"` ActiveDescription *string `json:"-" db:"active_description"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"-" db:"updated_at"` Level int `json:"-" db:"level"` }
Click to show internal directories.
Click to hide internal directories.