package
0.0.0-20190826170031-b4f6b1bf9a4c
Repository: https://github.com/tintinnabulate/vmail.git
Documentation: pkg.go.dev

# Functions

AddSignup adds a signup with the given verification code to the datastore, returning the key of the newly created entity.
AddSite adds a site with the given verification code to the datastore, returning the key of the newly created entity.
CheckErr is a utility function for killing the app on the event of a non-nil error.
ComposeVerificationEmail builds the verification email, ready to be sent.
CreateHandler creates my mux.Router.
CreateSignupEndpoint handles POST /signup/{email}.
EmailVerificationCode composes and sends a verification code email.
Given a code, return the datastore key and signup.
GetSignupCode gets the signup code matching the given email address.
Given a code, return the datastore key and signup.
IsCodeAvailable checks the database to see if a code is unique (true)/already used (false).
IsSignupVerified checks the database to see if an email address exits and is verified.
IsSignupVerifiedEndpoint handles GET /signup/{email}.
MarkVerified marks the signup as verified with the given ID.
RandToken generates a random token, for use in verification codes.
VerifyCodeEndpoint handles GET /verify/{code}.

# Structs

Config : the configuration file format.
Email holds our JSON response for GET and POST /signup/{email}.
Signup is used to hold signup entries going into/coming out of the datastore.
Site : stores each site we verify emails for.
Verification holds our JSON response for GET /verify/{code}.