Documentation ¶
Index ¶
- Variables
- func CheckRateLimit(r *http.Request) bool
- func Commaf(j interface{}) string
- func Decrypt(key []byte, securemess string) (decodedmess string, err error)
- func Encrypt(key []byte, message string) (encmess string, err error)
- func GenerateBase32(length int) string
- func GenerateBase64(length int) string
- func GetString(a interface{}) string
- func IsLocal(Addr string) bool
- func SendEmail(from string, to []string, cc []string, bcc []string, subject string, ...) error
- type SentEmail
- type SentEmailsDuringTestsType
- func (se *SentEmailsDuringTestsType) AddSentEmail(from string, to []string, subject string, CC []string, message []byte)
- func (se *SentEmailsDuringTestsType) ClearTestEmails()
- func (se *SentEmailsDuringTestsType) IsAnyEmailSentWithStringInBodyOrSubject(expectedEmail *SentEmail) bool
- func (se *SentEmailsDuringTestsType) IsAnyMatchedEmailSent(expectedEmail *SentEmail) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var SentEmailsDuringTests = SentEmailsDuringTestsType{ SentEmails: make([]SentEmail, 0), }
Functions ¶
func CheckRateLimit ¶
CheckRateLimit checks if the request has remaining quota or not. If it returns false, the IP in the request has exceeded their quota
func Commaf ¶
func Commaf(j interface{}) string
commaf is a function to format number with thousand separator and two decimal points
func GenerateBase32 ¶
GenerateBase32 generates a base64 string of length length
func GenerateBase64 ¶
GenerateBase64 generates a base64 string of length length
Types ¶
type SentEmailsDuringTestsType ¶
type SentEmailsDuringTestsType struct {
SentEmails []SentEmail
}
func (*SentEmailsDuringTestsType) AddSentEmail ¶
func (*SentEmailsDuringTestsType) ClearTestEmails ¶
func (se *SentEmailsDuringTestsType) ClearTestEmails()
func (*SentEmailsDuringTestsType) IsAnyEmailSentWithStringInBodyOrSubject ¶
func (se *SentEmailsDuringTestsType) IsAnyEmailSentWithStringInBodyOrSubject(expectedEmail *SentEmail) bool
func (*SentEmailsDuringTestsType) IsAnyMatchedEmailSent ¶
func (se *SentEmailsDuringTestsType) IsAnyMatchedEmailSent(expectedEmail *SentEmail) bool
Click to show internal directories.
Click to hide internal directories.