Back to

Package srv

v0.0.0 (d26fc85)
Latest Go to latest
Published: May 2, 2015 | License: BSD-3-Clause | Module:


Package srv provides utilities and functions to make the server running possible.


Package Files

func OpenDBSession

func OpenDBSession(cfg config.DatabaseConfig) (*sql.DB, error)

OpenDBSession creates a session to the database.

func SetupRouter

func SetupRouter(db *sql.DB, cors bool) *mux.Router

SetupRouter creates API routes. The cors parameter is used to specify whether to enable Cross Origin Resource Sharing or not.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier