api

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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) AddBaseHandler

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

AddBaseHandler adds the handler to the base path

func (*RouteBuilder) AddBaseHandlerFunc

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

AddBaseHandlerFunc adds a handler function to the base router for a specific pattern

func (*RouteBuilder) AddBaseRoutes

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

AddBaseRoutes adds the controllers routes to the base path

func (*RouteBuilder) AddV1Routes

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

AddV1Routes adds the controllers routes to the /v1 path

func (*RouteBuilder) Build

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

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

Directories

Path Synopsis
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