api

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package api package

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
Package controllers package
Package controllers package
tfe
Package tfe package
Package tfe package
Package graphql package
Package graphql package
loader
Package loader package
Package loader package
resolver
Package resolver package
Package resolver package
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 middleware package
Package middleware package
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