Documentation ¶
Index ¶
- Constants
- func Decrypt(encrypted string) (string, error)
- func Encrypt(unencrypted string) (string, error)
- func GenerateSign(data interface{}) string
- func HashPassword(password string) (hash, salt, algorithm string, err error)
- func RespondWithError(w http.ResponseWriter, code int, message string)
- func RespondWithSuccess(w http.ResponseWriter, code int, data interface{})
- func TokenGenerator(userId string, email string, tokenType string) (tokenString string, err error)
- type Response
Constants ¶
View Source
const CIPHER_KEY = "w!z%C*F)J@NcRfUjXn2r5u8x/A?D(G+K"
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
https://gist.github.com/brettscott/2ac58ab7cb1c66e2b4a32d6c1c3908a7 Decrypt decrypts cipher text string into plain text string
func GenerateSign ¶
func GenerateSign(data interface{}) string
func HashPassword ¶
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, message string)
func RespondWithSuccess ¶
func RespondWithSuccess(w http.ResponseWriter, code int, data interface{})
Types ¶
Click to show internal directories.
Click to hide internal directories.