package
0.0.0-20191223111852-1bc63cf51d79
Repository: https://github.com/opencourseplatform/opencourseplatform-go.git
Documentation: pkg.go.dev

# Functions

ActivateAccount gets the userID from database that matches the username variable sent in.
ActivateTokenInDB ...
Authenticating endpoint parses the form data the user sent in and authenticates the user if it is valid.
EmailIsValid checks if the email is valid and returns it in boolean form.
GetHost gets the SiteUrl value in the settings table in the database.
GetMailSender gets the MailSender value in the settings table in the database.
GetPasswordHashFromUsername returns the password hash from the database associated with the username sent in.
GetPostmarkClient gets the PostmarkToken value in the settings table in the database.
GetRegistrationMailSubject gets the RegistrationMailSubject value in the settings table in the database.
GetUserIDFromUsername gets the userID from database that matches the username variable sent in.
InsertActivationToken inserts the activation token into the database */.
InsertNewUser inserts the user into the database.
SetSessionUsername sets the session username for the user to the username variable sent in.
SignIn endpoint displays a HTML page.
SignOut endpoint removes the username from the session.
SignUp endpoint returns the Sign up HTML page.
SignUpNewUser endpoint parses the form for signing up and inserts the user into the database and sends a verification email.

# Structs

Page is a generic HTML page with only the necessary data.
VerificationMail contains the data to render the verification mail HTML page.