router

package
v0.0.0-...-5623d4f Latest Latest
Warning

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

Go to latest
Published: May 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is a wrapper around muxinator.Router that conforms to the bootstrap.Process interface

func New

func New() *Router

New returns a new router

func (*Router) Delete

func (r *Router) Delete(path string, handler http.HandlerFunc, middlewares ...muxinator.Middleware)

Delete is a helper function to add a DELETE route

func (*Router) Get

func (r *Router) Get(path string, handler http.HandlerFunc, middlewares ...muxinator.Middleware)

Get is a helper function to add a GET route

func (*Router) GetName

func (r *Router) GetName() string

func (*Router) Patch

func (r *Router) Patch(path string, handler http.HandlerFunc, middlewares ...muxinator.Middleware)

Patch is a helper function to add a PATCH route

func (*Router) Post

func (r *Router) Post(path string, handler http.HandlerFunc, middlewares ...muxinator.Middleware)

Post is a helper function to add a POST route

func (*Router) Put

func (r *Router) Put(path string, handler http.HandlerFunc, middlewares ...muxinator.Middleware)

Put is a helper function to add a PUT route

func (*Router) Start

func (r *Router) Start() error

Start will listen for TCP connections on the port defined in config

func (*Router) Stop

func (r *Router) Stop(ctx context.Context) error

Stop will gracefully shutdown the server

Jump to

Keyboard shortcuts

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