user

package
v0.0.0-...-df163ab Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetUserImageQuery string = "SELECT PictureUrl, LoginName FROM users WHERE LoginName='%s'"

AND (Password='%s' OR Password is null OR Password=”)"

View Source
var GetUserMenusQuery string = "" /* 567-byte string literal not displayed */
View Source
var LoginQuery string = "SELECT ID,Name,LastName, LanguageCode, TimeZoneCode, Password FROM users WHERE LoginName='%s' "
View Source
var TableName string = "users"

Functions

func SaveUser

func SaveUser(user *User) error

Types

type ChangePwdData

type ChangePwdData struct {
	Username    string `json:"username"`
	OldPassword string `json:"oldpassword"`
	NewPassword string `json:"newpassword"`
}

type LoginUserData

type LoginUserData struct {
	ID       int    `json:"id"` // The user's unique ID
	Username string `json:"username"`
	Password string `json:"password"`
	ClientID string `json:"clientid"`
	Token    string `json:"token"`
	Renew    bool   `json:"renew"`
}

type User

type User struct {
	ID         int    `json:"id"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	ClientID   string `json:"clientid"`
	Token      string `json:"token"`
	CreatedOn  string `json:"createdon"`
	ExpirateOn string `json:"expirateon"`
	Email      string `json:"email"`
	Language   string `json:"language"`
	TimeZone   string `json:"timezone"`
}

type UserController

type UserController struct{}

func (*UserController) ChangePassword

func (c *UserController) ChangePassword(ctx *gin.Context)

func (*UserController) Create

func (c *UserController) Create(ctx *gin.Context)

func (*UserController) Image

func (c *UserController) Image(ctx *gin.Context)

func (*UserController) List

func (c *UserController) List(ctx *gin.Context)

func (*UserController) Login

func (c *UserController) Login(ctx *gin.Context)

func (*UserController) Logout

func (c *UserController) Logout(ctx *gin.Context)

func (*UserController) UserMenus

func (c *UserController) UserMenus(ctx *gin.Context)

Jump to

Keyboard shortcuts

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