Documentation ¶
Index ¶
- func CheckToken(c *gin.Context)
- func CreateAccount(c *gin.Context)
- func DelateAccount(ID primitive.ObjectID) error
- func DelateSession(c *gin.Context)
- func DelateaAccount(c *gin.Context)
- func EmailIsAvailable(Email string) bool
- func GetBasicInfo(ID primitive.ObjectID, data interface{}) error
- func GetPublications(UserID string, Next int) ([]blog.FeedStrcture, error)
- func IPAddrUser(data *IpAddrUser) (bool, error)
- func Iploggeduser(c *gin.Context)
- func Login(c *gin.Context)
- func RecoveryAccount(c *gin.Context)
- func RemoveIPAddrUser(uudi string) error
- func SearchMyPublications(c *gin.Context)
- func Signout(c *gin.Context)
- func TokenRenewal(c *gin.Context)
- func UpdateUserInfo(id primitive.ObjectID, data *UserStrcture) (*mongo.UpdateResult, error)
- func Updateinfo(c *gin.Context)
- func UserInfo(c *gin.Context)
- func ValidateRecoveryAccount(c *gin.Context)
- type BasicInfo
- type Data
- type IpAddrUser
- type LoginRequestStruct
- type RecoveryAccountStrctureTemplate
- type UserStrcture
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckToken ¶
func CreateAccount ¶
func DelateAccount ¶
func DelateSession ¶
func DelateaAccount ¶
func EmailIsAvailable ¶
func GetBasicInfo ¶
func GetPublications ¶
func GetPublications(UserID string, Next int) ([]blog.FeedStrcture, error)
func IPAddrUser ¶
func IPAddrUser(data *IpAddrUser) (bool, error)
func Iploggeduser ¶
func RemoveIPAddrUser ¶
func TokenRenewal ¶
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 ¶
Types ¶
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 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 ¶
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
Click to show internal directories.
Click to hide internal directories.