Documentation ¶
Index ¶
- Constants
- func CreateToken(username, fullname, displayname string) (string, error)
- func GeneratePassword(passwordLength, minSpecialChar, minNum, minUpperCase int) string
- func GetEndTime(days int) time.Time
- func GetLocation() *time.Location
- func RemoveContents(dir string) error
- type Authorizer
- type Claims
Constants ¶
View Source
const JWTExpirationTime time.Duration = (90 * 24) * time.Hour
JWTExpirationTime specifies the system-wide JWT expiration
View Source
const (
SMTPServer = "smtp.pobox.com"
)
GMail smtp server
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
CreateToken create a jwt token
func GeneratePassword ¶
GeneratePassword will generate a password on the minimum length
func GetEndTime ¶
GetEndTime returns the time days from now at 11:59pm
func GetLocation ¶
GetLocation returns the locations for all time functions
func RemoveContents ¶
RemoveContents removes the contents of a directory
Types ¶
type Authorizer ¶
Authorizer is the sender of the message
func NewAuthorizer ¶
func NewAuthorizer(Username, Password string) Authorizer
NewAuthorizer creates a new sender
func (Authorizer) SendMail ¶
func (a Authorizer) SendMail(Dest []string, sender, Subject, bodyMessage string)
SendMail sends a basic message
func (*Authorizer) WriteHTMLEmail ¶
func (a *Authorizer) WriteHTMLEmail(dest []string, from, subject, bodyMessage string) string
WriteHTMLEmail composes the body of the message as an HTML email
func (*Authorizer) WritePlainEmail ¶
func (a *Authorizer) WritePlainEmail(dest []string, from, subject, bodyMessage string) string
WritePlainEmail composes the body of the message as plain text
Click to show internal directories.
Click to hide internal directories.