app

package
v0.0.0-...-138ac3e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: MIT Imports: 6 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     *pure.Mux
	Repository *repository.TaskRepository
}

App holds common API structures.

func New

func New(router *pure.Mux, db *sql.DB) *App

New creates and returns a new App instance.

func (*App) CreateTask

func (app *App) CreateTask(writer http.ResponseWriter, request *http.Request)

CreateTask wraps the CreateTaskHandler.

func (*App) DeleteTask

func (app *App) DeleteTask(writer http.ResponseWriter, request *http.Request)

DeleteTask wraps the DeleteTaskHandler.

func (*App) GetRoot

func (app *App) GetRoot(writer http.ResponseWriter, request *http.Request)

GetRoot warps the RootHandler.

func (*App) GetTask

func (app *App) GetTask(writer http.ResponseWriter, request *http.Request)

GetTask wraps the GetTaskHandler.

func (*App) ListTasks

func (app *App) ListTasks(writer http.ResponseWriter, request *http.Request)

ListTasks wraps the ListTasksHandler.

func (*App) RegisterRoutes

func (app *App) RegisterRoutes()

RegisterRoutes registers all availlable routes into the router.

func (*App) UpdateTask

func (app *App) UpdateTask(writer http.ResponseWriter, request *http.Request)

UpdateTask wraps the UpdateTaskHandler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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