Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SayEmailInvalid = "Email invalid." SayUsernameShort = "Username is too short." SayEnterUserOrEmail = "Enter a username or email." SayPasswordInvalid = "Password is invalid." SayPasswordNoMatch = "Passwords do not match." SayEmailTaken = "Email is taken." SayUsernameTaken = "Username is taken." SayBadLogin = "Incorrect password or account does not exist" SayParseForm = "internal Server Error - 13481" SayAuthStateNil = "internal Server Error - 13483" SayHashPassword = "internal Server Error - 19283" SayDbInsertUser = "internal Server Error - 12405" SayReflect = "internal Server Error - 12405" )
User-facing messages
Functions ¶
This section is empty.
Types ¶
type AuthResult ¶
func SignIn ¶
func SignIn(a PSignIn) AuthResult
func SignUp ¶
func SignUp(a PSignUp) AuthResult
The caller is required to do the Insert to their database.
type DbAccessor ¶
type DbAccessor interface { SelectUserById(ctx context.Context, id string) (interface{}, error) SelectUserByEmail(ctx context.Context, email string) (interface{}, error) SelectUserByEmailWithPassword(ctx context.Context, email string) (interface{}, error) SelectUserByUsername(ctx context.Context, username string) (interface{}, error) SelectUserByUsernameWithPassword(ctx context.Context, username string) (interface{}, error) }
type PSignIn ¶
type PSignIn struct { UserOrEmail string Password string Db DbAccessor }
Click to show internal directories.
Click to hide internal directories.