router

package
v0.0.0-...-7c57c08 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRouter

type APIRouter interface {
	// Prefix is the prefix of the API method, e.g. self or template.
	Prefix() string

	/// Routes provides the different routes for this APIRouter
	Routes(prefix string, r chi.Router)

	// Version returns the API version for the routes.
	Version() int8
}

APIRouter provides a Chi Mux that contains a set of API routes.

type Builder

type Builder interface {
	New() *chi.Mux
}

Builder is used to create a new Chi Mux with all the routes and configurations set.

func NewRouterBuilder

func NewRouterBuilder(
	apiRouters []APIRouter,
	webRouter WebRouter) Builder

NewRouterBuilder creates a new instance of the Builder interface.

type WebRouter

type WebRouter interface {
	/// Routes provides the different routes for this WebRouter
	Routes(r *chi.Mux, rootRouter func() chi.Router)
}

WebRouter provides a Chi Mux that contains a set of web routes.

Jump to

Keyboard shortcuts

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