api

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteBuilder

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

RouteBuilder is used to build a Router instance

func NewRouteBuilder

func NewRouteBuilder(middlewares ...func(http.Handler) http.Handler) *RouteBuilder

NewRouteBuilder creates an instance of RouterBuilder

func (*RouteBuilder) AddHandler added in v0.7.0

func (rb *RouteBuilder) AddHandler(pattern string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) *RouteBuilder

AddHandler adds the handler to the path

func (*RouteBuilder) AddHandlerFunc added in v0.7.0

func (rb *RouteBuilder) AddHandlerFunc(method string, pattern string, handler http.HandlerFunc) *RouteBuilder

AddHandlerFunc adds a handler function to the router for a specific pattern

func (*RouteBuilder) AddRoutes added in v0.7.0

func (rb *RouteBuilder) AddRoutes(controller controllers.Controller) *RouteBuilder

AddRoutes adds the controllers routes to the path

func (*RouteBuilder) Router added in v0.7.0

func (rb *RouteBuilder) Router() chi.Router

Router returns and instance of a chi.Router with all routes added

func (*RouteBuilder) SubRouteBuilder added in v0.7.0

func (rb *RouteBuilder) SubRouteBuilder(subPath string) *RouteBuilder

SubRouteBuilder returns a RouteBuilder under the given subpath

func (*RouteBuilder) WithSubRouter added in v0.7.0

func (rb *RouteBuilder) WithSubRouter(subPath string, middlewares ...func(http.Handler) http.Handler) *RouteBuilder

WithSubRouter mounts a router under the current RouteBuilder with the given subpath

Directories

Path Synopsis
tfe
schema
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
Package response providers support for returning http responses
Package response providers support for returning http responses

Jump to

Keyboard shortcuts

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