routers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRouterNotRegistered error = errors.New("Router not registered.")
	ErrNoRouterNameDefined error = errors.New("No router name provided.")
)

Errors used by the router setter

Functions

func GetSettedRouter

func GetSettedRouter(
	c *controller.Controller,
	cfg *config.Gateway,
	i *i18n.Support,
) (http.Handler, error)

GetSettedRouter gets the registered router for the provided controller, middlewares and configuration.

func RegisterRouter

func RegisterRouter(name string, f SetterFunc)

RegisterRouter registers provided router with the provided name The router is obtainable after calling the RouterSetterFunc

Types

type SetterFunc

type SetterFunc func(
	c *controller.Controller,
	cfg *config.Gateway,
	sup *i18n.Support,
) (http.Handler, error)

SetterFunc is the function that sets all the api routes for the provided handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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