infra

package
v0.0.0-...-29bb57a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 NewRouter

func NewRouter(
	environment domain.Environment,
	port string,
	corsAllowedOrigins []string,
	errorReporter usecases.ErrorReporter,
	routes ...services.Route,
) services.Router

NewRouter instantiates a router

func NewValidator

func NewValidator() usecases.Validator

NewValidator validates structs and possibly other stuff in the future

Types

type RDB

type RDB = sqlx.DB

RDB is a relational database connection pool

func NewRDB

func NewRDB(URL string, maxIdleConns, maxOpenConns int) (*RDB, error)

NewRDB creates a new relational database connection pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL