Documentation ¶
Index ¶
- Variables
- func ChangePassword(c echo.Context) error
- func CreateUser(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func Developer(c echo.Context) error
- func ForgotPassword(c echo.Context) error
- func GetAll(c echo.Context) error
- func GetAllRBAC(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUserRBAC(c echo.Context) error
- func HashPassword(pw string) (string, error)
- func Login(c echo.Context) error
- func ResetPassword(c echo.Context) error
- func Router(e *echo.Echo)
- func ToggleUserActive(c echo.Context) error
- func UpdateUser(c echo.Context) error
- func UpdateUserRole(c echo.Context) error
- func Validate(u *User) (bool, string)
- func ValidateField(field string, fieldType string) (bool, string)
- func ValidateWithoutPassword(u *User) (bool, string)
- type PasswordReset
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Reset_Password_Expired int64 = 64
Functions ¶
func ChangePassword ¶
func ForgotPassword ¶
func GetAll ¶
GetAll is used to get all users using query params to offset/limit/sort (pagination) sortKeys := []string{"email", "name", "role", "created_at", "updated_at"} sortValues := []string{"asc", "desc"}
func GetAllRBAC ¶
func GetUserRBAC ¶
func HashPassword ¶
HashPassword is used to hash user password using bcrypt
func Login ¶
Login is used to login user in If email and password are correct, response token and user role Otherwise, response bad request
func ResetPassword ¶
func ToggleUserActive ¶
func UpdateUser ¶
EditUser is used to edit user information by ID Allow update values: name, email, username, timezone password and role will be update in other API endpoint because of security reason!
func UpdateUserRole ¶
func ValidateWithoutPassword ¶
Types ¶
type PasswordReset ¶
type PasswordReset = model.PasswordReset
Click to show internal directories.
Click to hide internal directories.