Documentation
¶
Index ¶
- Constants
- func Decode(s string) []byte
- func DecodeMD5(s string) string
- func DecryptAES(text string) (string, error)
- func Descrypt(hashedPwd string, plainPwd []byte) bool
- func Encode(b []byte) string
- func EncodeMD5(value string) string
- func Encript(pwd []byte) string
- func EncryptAES(text string) (string, error)
- func GenerateToken(username, password string, remember bool) (string, error)
- func GetPage(c *gin.Context) int
- func GetPwd() []byte
- func Message(status bool, message string) map[string]interface{}
- func Respond(w http.ResponseWriter, data map[string]interface{})
- func Setup()
- type Claims
Constants ¶
View Source
const MySecret string = "fir&1*~#^2^#s0^=)_^7%b34"
This should be in an env file in production
Variables ¶
This section is empty.
Functions ¶
func DecryptAES ¶
Decrypt method is to extract back the encrypted text
func EncryptAES ¶
Encrypt method is to encrypt or hide any classified text
func GenerateToken ¶
GenerateToken generate tokens used for auth
func Respond ¶
func Respond(w http.ResponseWriter, data map[string]interface{})
Types ¶
Click to show internal directories.
Click to hide internal directories.