api

package
v0.0.0-...-6fa5ef3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 15 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 {
	// contains filtered or unexported fields
}

App provides context for running the API server.

func New

func New(db *database.DB, router *router.Router) *App

New returns an app with the provided router and database.

func (*App) Run

func (a *App) Run(address string) error

Run starts a server with App, returning an error if it returns.

func (*App) SetupRouter

func (a *App) SetupRouter()

SetupRouter adds routes to the app.

Jump to

Keyboard shortcuts

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