Documentation ¶
Index ¶
- Variables
- func ConfigureCustomValidators()
- func NewClock(locationName string) (usecases.Clock, error)
- func NewErrorReporter(dsn string) (usecases.ErrorReporter, error)
- func NewJWTGenerator(signingKey string, clock usecases.Clock) usecases.JWTGenerator
- func NewPasswordHasher() usecases.PasswordHasher
- func NewRouter(environment domain.Environment, port string, jwtSecret string, ...) services.Router
- func NewSQLHandler(db *RDB) rdb.SQLHandler
- func NewValidator() usecases.Validator
- type RDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyUser = fail.Errorf("user is empty")
ErrEmptyUser when context contains no user when trying to get one
Functions ¶
func ConfigureCustomValidators ¶
func ConfigureCustomValidators()
ConfigureCustomValidators sets up custom struct validators
func NewErrorReporter ¶
func NewErrorReporter(dsn string) (usecases.ErrorReporter, error)
NewErrorReporter creates a new error reporter that sends errors to sentry
func NewJWTGenerator ¶
func NewJWTGenerator(signingKey string, clock usecases.Clock) usecases.JWTGenerator
NewJWTGenerator intializes a new JWTGenerator
func NewPasswordHasher ¶
func NewPasswordHasher() usecases.PasswordHasher
NewPasswordHasher initializes a new password hasher with sane defaults
func NewRouter ¶
func NewRouter( environment domain.Environment, port string, jwtSecret string, sessionCookieName string, corsAllowedOrigins []string, errorReporter usecases.ErrorReporter, routes ...services.Route, ) services.Router
NewRouter instantiates a router
func NewSQLHandler ¶
func NewSQLHandler(db *RDB) rdb.SQLHandler
NewSQLHandler creates an interface to run queries on a database
func NewValidator ¶
NewValidator validates structs and possibly other stuff in the future
Types ¶
Click to show internal directories.
Click to hide internal directories.