Documentation ¶
Index ¶
Constants ¶
View Source
const ( Privatekey = `` /* 1674-byte string literal not displayed */ Tokenduration = time.Hour * 24 )
For a while, we hardcode this value, but we need use true values
Variables ¶
View Source
var ( DB_URL string = "localhost" DB_NAME string = "mstock" )
Functions ¶
func ParseToken ¶
Get a object token from a string hash that represent the token
Types ¶
type Token ¶
With this data we could authentic the user
func GenerateToken ¶
Create and return a object Token, this need one o more strings for generate a hash
type User ¶
type User struct { IdUser string `json:"id_user"` Name string `json:"name"` Pass string `json:"pass"` Email string `json:"email"` LastLogin time.Time `json:"last_login"` CreatedAt time.Time `json:"create_at"` UpdateAt time.Time `json:"update"` Token Token `json:"token"` }
Data representing the application user, is the structure that is going to relate all application data, to perform effective monitoring of user actions.
Click to show internal directories.
Click to hide internal directories.