Documentation
¶
Index ¶
- func AuthDaoInit(sqlSelectFieldsAccount string)
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(s int) (string, error)
- type Auth
- func (s *Auth) Authentication(w http.ResponseWriter, r *http.Request) (*entity.Account, string)
- func (s *Auth) Cryptcode(text string) string
- func (s *Auth) DeleteSession(sessionId string, w http.ResponseWriter)
- func (s *Auth) Generate_password() string
- func (s *Auth) Generate_pinCode() string
- func (s *Auth) GetCookie(cookieName string, r *http.Request) string
- func (s *Auth) GetIP(r *http.Request) string
- func (s *Auth) Rand_char(length int, chars []byte) string
- func (s *Auth) SendEmail(subject, to, body string)
- func (s *Auth) SetSession(account *entity.Account, r *http.Request, w http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthDaoInit ¶
func AuthDaoInit(sqlSelectFieldsAccount string)
func GenerateRandomBytes ¶
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
Types ¶
type Auth ¶
var AuthDao *Auth
func (*Auth) Authentication ¶
func (*Auth) DeleteSession ¶
func (s *Auth) DeleteSession(sessionId string, w http.ResponseWriter)
func (*Auth) Generate_password ¶
func (*Auth) Generate_pinCode ¶
func (*Auth) SetSession ¶
Click to show internal directories.
Click to hide internal directories.