app

package
v0.0.0-...-3c93229 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config    config.Config
	Database  *database.Postgres
	Redis     *database.Redis
	Recaptcha recaptcha.ReCAPTCHA
}

App holds the Config struct, database connections for Postgres and Redis and the reCaptcha configuration

func New

func New(appConfig config.Config) *App

New connects to the databases and stores the connection in the returned App struct

func (*App) IsProd

func (a *App) IsProd() bool

IsProd returns if the App struct is configured for production

func (*App) Run

func (a *App) Run(r *mux.Router)

Run sets up CORS policy and allows the API listen and serve

Jump to

Keyboard shortcuts

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