app

package
v0.0.0-...-adfe93d Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: MIT Imports: 10 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 {
	Router *mux.Router
	DB     *db.DB
}

An app defines the router and the database connection for an HTTP server.

func (*App) Initialize

func (a *App) Initialize(user, password, dbName string)

Initialize establishes the database connection and initializes the router.

func (*App) Run

func (a *App) Run(addr string)

Run starts a HTTP server on the given port.

Jump to

Keyboard shortcuts

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