Documentation ¶
Index ¶
- func Body[B any](c *Ctx) B
- func Headers[H any](c *Ctx) H
- func InitReflector(port int, addresses []string, opts *OASOptions) *openapi3.Reflector
- func Params[P any](c *Ctx) P
- func Query[Q any](c *Ctx) Q
- func WithOIDC(ref *openapi3.Reflector, url, client, secret string)
- type AppRouter
- type AppRouterOptions
- type Ctx
- type EchoRouter
- func (f *EchoRouter) Run()
- func (f *EchoRouter) Use(fn func(r *AppRouter)) AppRouter
- func (f *EchoRouter) WithDefaultMiddleware() AppRouter
- func (f *EchoRouter) WithFrontend(data embed.FS) AppRouter
- func (f *EchoRouter) WithMetrics() AppRouter
- func (f *EchoRouter) WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) AppRouter
- func (f *EchoRouter) WithRequestLogger() AppRouter
- func (f *EchoRouter) WithRoute(method, path string, fn []HandlerFunc) AppRouter
- func (f *EchoRouter) WithTracing(url ...string) AppRouter
- type FiberRouter
- func (f *FiberRouter) Run()
- func (f *FiberRouter) Use(fn func(r *AppRouter)) AppRouter
- func (f *FiberRouter) WithDefaultMiddleware() AppRouter
- func (f *FiberRouter) WithFrontend(data embed.FS) AppRouter
- func (f *FiberRouter) WithMetrics() AppRouter
- func (f *FiberRouter) WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) AppRouter
- func (f *FiberRouter) WithRequestLogger() AppRouter
- func (f *FiberRouter) WithRoute(method, path string, fn []HandlerFunc) AppRouter
- func (f *FiberRouter) WithTracing(url ...string) AppRouter
- type Golain
- func (g *Golain) EnableMetrics() *Golain
- func (g *Golain) EnableQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) *Golain
- func (g *Golain) EnableTracing(url ...string) *Golain
- func (g *Golain) Register(fn func(g *Golain)) *Golain
- func (g *Golain) RegisterRoutes(routes ...*Route) *Golain
- func (g *Golain) Run()
- func (g *Golain) WithDefaultMiddleware() *Golain
- type HandlerFunc
- type OASOptions
- type Option
- type Res
- type Route
- func Delete[T interface{}](path string, handlers ...HandlerFunc) *Route
- func Get[T any](path string, handlers ...HandlerFunc) *Route
- func Patch[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
- func Post[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
- func Put[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitReflector ¶
func InitReflector(port int, addresses []string, opts *OASOptions) *openapi3.Reflector
InitReflector ...
Types ¶
type AppRouter ¶
type AppRouter interface { Use(fn func(r *AppRouter)) AppRouter WithDefaultMiddleware() AppRouter WithRoute(method, path string, fn []HandlerFunc) AppRouter WithTracing(url ...string) AppRouter WithMetrics() AppRouter WithFrontend(data embed.FS) AppRouter WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) AppRouter Run() }
AppRouter ...
type AppRouterOptions ¶
type AppRouterOptions struct { ID string Version string Host string Port int Banner bool RequestLogger bool }
AppRouterOptions ...
type Ctx ¶
type Ctx struct { Params map[string]string Query map[string]string Headers map[string]string Body []byte Context context.Context }
Ctx ...
func (*Ctx) SetContext ¶
SetContext is a setter for Ctx.Context
func (*Ctx) SetHeaders ¶
SetHeaders is a setter for Ctx.Headers
type EchoRouter ¶
type EchoRouter struct {
// contains filtered or unexported fields
}
EchoRouter ...
func (*EchoRouter) WithDefaultMiddleware ¶
func (f *EchoRouter) WithDefaultMiddleware() AppRouter
WithDefaultMiddleware ...
func (*EchoRouter) WithFrontend ¶
func (f *EchoRouter) WithFrontend(data embed.FS) AppRouter
WithFrontend ...
func (*EchoRouter) WithQueue ¶
func (f *EchoRouter) WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) AppRouter
WithQueue ...
func (*EchoRouter) WithRequestLogger ¶
func (f *EchoRouter) WithRequestLogger() AppRouter
WithRequestLogger ...
func (*EchoRouter) WithRoute ¶
func (f *EchoRouter) WithRoute(method, path string, fn []HandlerFunc) AppRouter
WithRoute ...
func (*EchoRouter) WithTracing ¶
func (f *EchoRouter) WithTracing(url ...string) AppRouter
WithTracing ...
type FiberRouter ¶
type FiberRouter struct {
// contains filtered or unexported fields
}
FiberRouter ...
func (*FiberRouter) WithDefaultMiddleware ¶
func (f *FiberRouter) WithDefaultMiddleware() AppRouter
WithDefaultMiddleware ...
func (*FiberRouter) WithFrontend ¶
func (f *FiberRouter) WithFrontend(data embed.FS) AppRouter
WithFrontend ...
func (*FiberRouter) WithQueue ¶
func (f *FiberRouter) WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) AppRouter
WithQueue ...
func (*FiberRouter) WithRequestLogger ¶
func (f *FiberRouter) WithRequestLogger() AppRouter
WithRequestLogger ...
func (*FiberRouter) WithRoute ¶
func (f *FiberRouter) WithRoute(method, path string, fn []HandlerFunc) AppRouter
WithRoute ...
func (*FiberRouter) WithTracing ¶
func (f *FiberRouter) WithTracing(url ...string) AppRouter
WithTracing ...
type Golain ¶
type Golain struct {
// contains filtered or unexported fields
}
Golain ...
func (*Golain) EnableQueue ¶
EnableQueue ...
func (*Golain) EnableTracing ¶
EnableTracing ...
func (*Golain) RegisterRoutes ¶
RegisterRoutes ...
func (*Golain) WithDefaultMiddleware ¶
WithDefaultMiddleware ...
type OASOptions ¶
type OASOptions struct { Title string Description string Version string OASVersion string AuthURL string AuthClient string AuthSecret string }
OASOptions ...
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route ...
func Delete ¶
func Delete[T interface{}](path string, handlers ...HandlerFunc) *Route
Delete creates a DELETE route
func Patch ¶
func Patch[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
Patch creates a PATCH route
func Post ¶
func Post[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
Post creates a POST route
func Put ¶
func Put[T interface{}, D interface{}](path string, handlers ...HandlerFunc) *Route
Put creates a PUT route
Click to show internal directories.
Click to hide internal directories.