Version: v0.0.0-...-5e89e8d Latest Latest

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 23 Imported by: 0




This section is empty.


This section is empty.


func CheckToken

func CheckToken(c *gin.Context)

func CreateAccount

func CreateAccount(c *gin.Context)

func DelateAccount

func DelateAccount(ID primitive.ObjectID) error

func DelateSession

func DelateSession(c *gin.Context)

func DelateaAccount

func DelateaAccount(c *gin.Context)

func EmailIsAvailable

func EmailIsAvailable(Email string) bool

func GetBasicInfo

func GetBasicInfo(ID primitive.ObjectID, data interface{}) error

func IPAddrUser

func IPAddrUser(data *IpAddrUser) (bool, error)

func Iploggeduser

func Iploggeduser(c *gin.Context)

func Login

func Login(c *gin.Context)

func RecoveryAccount

func RecoveryAccount(c *gin.Context)


func RemoveIPAddrUser

func RemoveIPAddrUser(uudi string) error

func Signout

func Signout(c *gin.Context)

func TokenRenewal

func TokenRenewal(c *gin.Context)

Renew the token that is about to expire and delete the token that is about to expire.

func UpdateUserInfo

func UpdateUserInfo(id primitive.ObjectID, data *UserStrcture) (*mongo.UpdateResult, error)

func Updateinfo

func Updateinfo(c *gin.Context)

func UserInfo

func UserInfo(c *gin.Context)

func ValidateRecoveryAccount

func ValidateRecoveryAccount(c *gin.Context)



type BasicInfo

type BasicInfo struct {
	Username    string `bson:"Username,omitempty"`
	FirstName   string `bson:"FirstName,omitempty"`
	LastName    string `bson:"LastName,omitempty"`
	Permissions string `bson:"Permissions,omitempty"`
	Email       string `bson:"Email,omitempty"`
	ID          string `bson:"_id,omitempty"`
	Image       string `bson:"Image,omitempty"`
	Banned      bool   `bson:"Banned,omitempty"`

Basic user structure

type Data

type Data []UserStrcture


type IpAddrUser

type IpAddrUser struct {
	IDuser    primitive.ObjectID `bson:"IDuser"`
	Date      time.Time          `bson:"Date"`
	IpAddrs   string             `bson:"IpAddrs"`
	DateOut   time.Time          `bson:"DateOut"`
	UserAgent string             `bson:"UserAgent"`
	Uuidtoken string             `bson:"Uuidtoken"`

Structure used in the logon record

func GetIpaddes

func GetIpaddes(Userid primitive.ObjectID) ([]IpAddrUser, error)

type LoginRequestStruct

type LoginRequestStruct struct {
	ID       uint64 `json:"id"`
	Email    string `json:"Email"`
	Password string `json:"Password"`

Structure of the login parameters

type RecoveryAccountStrctureTemplate

type RecoveryAccountStrctureTemplate struct {
	Name     string
	UrlToken string

Account recovery structure only basic parameters

type UserStrcture

type UserStrcture struct {
	Email       string    `bson:"Email,omitempty"`
	Image       string    `bson:"Image,omitempty"`
	Password    string    `json:"Password,omitempty" bson:"Password,omitempty"`
	FirstName   string    `bson:"FirstName,omitempty"`
	LastName    string    `bson:"LastName,omitempty"`
	Permissions string    `bson:"Permissions,omitempty"`
	Username    string    `bson:"Username,omitempty"`
	Banned      bool      `bson:"Banned"`
	Created_at  time.Time `bson:"Created_at,omitempty"`
	ID          string    `bson:"_id,omitempty"`

Complete user structure

Jump to

Keyboard shortcuts

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