user

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyDB            = "admin.user.gorm.db"
	KeyNoCheckRouter = "admin.user.router.nocheck"
	KeyCheckRouter   = "admin.user.router.check"
)

Variables

This section is empty.

Functions

func CheckConfig added in v0.2.1

func CheckConfig()

func CheckValue added in v0.2.1

func CheckValue(key, defaultValue string)

func Create added in v0.2.1

func Create(user *model.User) error

func Current added in v0.2.1

func Current(c *fiber.Ctx) *model.User

func GetBoolValue added in v0.2.1

func GetBoolValue(key string) bool

func GetByEmail added in v0.2.0

func GetByEmail(email string) (error, *model.User)

func GetByID added in v0.2.0

func GetByID(id uint) *model.User

func GetIntValue added in v0.2.1

func GetIntValue(key string, defaultVal int) int

func GetValue added in v0.2.1

func GetValue(key string) string

func SetValue added in v0.2.1

func SetValue(key, value string)

func SuperAccessCheck

func SuperAccessCheck(c *fiber.Ctx, obj *model.AdminObject) error

func UpdateFields added in v0.2.0

func UpdateFields(user *model.User, vals map[string]any) error

func UpdateLogin added in v0.2.1

func UpdateLogin(c *fiber.Ctx, userID uint) error

func UpdatePassword added in v0.2.0

func UpdatePassword(user *model.User, password string) error

func WithAdminAuth added in v0.2.1

func WithAdminAuth(c *fiber.Ctx) error

Types

type ReqLogin added in v0.2.1

type ReqLogin struct {
	Email    string `json:"email" validate:"required"`
	Password string `json:"password" validate:"required"`
	Remember bool   `json:"remember" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL