Documentation ¶
Overview ¶
Package auth deals with the authentication of the user. It's fairly simple: A user has a username and a password, which is saved hashed in the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { DB r.QueryExecutor Table string SigningKey string }
Client is the way you use this module. Just instantiate it with a db instance and call its methods
type ErrorNotFound ¶
ErrorNotFound is returned when the requested user is not present in the db
func (ErrorNotFound) Error ¶
func (e ErrorNotFound) Error() string
type ErrorWrongPass ¶
ErrorWrongPass is returned when the password doesn't match the one in the database
func (ErrorWrongPass) Error ¶
func (e ErrorWrongPass) Error() string
Click to show internal directories.
Click to hide internal directories.