routes

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Name       string
	Path       string
	Method     string
	ErrorTypes []api.ErrorType
	Data       any
	Body       types.Body
}

func ServerRoutes

func ServerRoutes(app core.App) []Route

type RouteGroup

type RouteGroup struct {
	Prefix string
	Routes []Route
}

func NewRouteGroup

func NewRouteGroup(prefix string) *RouteGroup

func (*RouteGroup) AddRoute

func (r *RouteGroup) AddRoute(name, path, method string, errorTypes []api.ErrorType, data any, body types.Body)

func (*RouteGroup) Register

func (r *RouteGroup) Register(handlers ...apis.Handler)

Jump to

Keyboard shortcuts

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