router

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTypeJSON

func ContentTypeJSON(next http.Handler) http.Handler

ContentTypeJSON sets the content type for requests to application/json

func NewAPIRouter

func NewAPIRouter(config *config.Config) *chi.Mux

Types

type Registerer

type Registerer struct {
	GetRoutes func(
		r chi.Router,
		config *config.Config,
		basePath *types.Path,
		factory shared.APIEndpointFactory,
		children ...*Registerer,
	) []*Route

	Children []*Registerer
}

func NewBaseRegisterer

func NewBaseRegisterer(children ...*Registerer) *Registerer

func NewClusterScopedRegisterer

func NewClusterScopedRegisterer(children ...*Registerer) *Registerer

func NewGitInstallationScopedRegisterer

func NewGitInstallationScopedRegisterer(children ...*Registerer) *Registerer

func NewHelmRepoScopedRegisterer

func NewHelmRepoScopedRegisterer(children ...*Registerer) *Registerer

func NewInfraScopedRegisterer

func NewInfraScopedRegisterer(children ...*Registerer) *Registerer

func NewInviteScopedRegisterer

func NewInviteScopedRegisterer(children ...*Registerer) *Registerer

func NewNamespaceScopedRegisterer

func NewNamespaceScopedRegisterer(children ...*Registerer) *Registerer

func NewOAuthCallbackRegisterer

func NewOAuthCallbackRegisterer(children ...*Registerer) *Registerer

func NewProjectIntegrationScopedRegisterer

func NewProjectIntegrationScopedRegisterer(children ...*Registerer) *Registerer

func NewProjectOAuthScopedRegisterer

func NewProjectOAuthScopedRegisterer(children ...*Registerer) *Registerer

func NewProjectScopedRegisterer

func NewProjectScopedRegisterer(children ...*Registerer) *Registerer

func NewRegistryScopedRegisterer

func NewRegistryScopedRegisterer(children ...*Registerer) *Registerer

func NewReleaseScopedRegisterer

func NewReleaseScopedRegisterer(children ...*Registerer) *Registerer

func NewSlackIntegrationScopedRegisterer

func NewSlackIntegrationScopedRegisterer(children ...*Registerer) *Registerer

func NewUserScopedRegisterer

func NewUserScopedRegisterer(children ...*Registerer) *Registerer

type RequestLoggerMiddleware

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

func (*RequestLoggerMiddleware) Middleware

func (mw *RequestLoggerMiddleware) Middleware(next http.Handler) http.Handler

type Route

type Route struct {
	Endpoint *shared.APIEndpoint
	Handler  http.Handler
	Router   chi.Router
}

func GetBaseRoutes

func GetBaseRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetClusterScopedRoutes

func GetClusterScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetGitInstallationScopedRoutes

func GetGitInstallationScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetHelmRepoScopedRoutes

func GetHelmRepoScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetInfraScopedRoutes

func GetInfraScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetInviteScopedRoutes

func GetInviteScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetNamespaceScopedRoutes

func GetNamespaceScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetOAuthCallbackRoutes

func GetOAuthCallbackRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetProjectIntegrationScopedRoutes

func GetProjectIntegrationScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetProjectOAuthScopedRoutes

func GetProjectOAuthScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetProjectScopedRoutes

func GetProjectScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetRegistryScopedRoutes

func GetRegistryScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetReleaseScopedRoutes

func GetReleaseScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetSlackIntegrationScopedRoutes

func GetSlackIntegrationScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

func GetUserScopedRoutes

func GetUserScopedRoutes(
	r chi.Router,
	config *config.Config,
	basePath *types.Path,
	factory shared.APIEndpointFactory,
	children ...*Registerer,
) []*Route

Jump to

Keyboard shortcuts

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