Documentation ¶
Index ¶
- type Function
- func (r *Function) Accept(mediaTypes ...string) *Function
- func (r *Function) Attribute(name string, val any) *Function
- func (r *Function) AttributeMap(attrs map[string]any) *Function
- func (r *Function) ContentType(mediaTypes ...string) *Function
- func (r *Function) UseMiddleware(function middleware.Function, options ...middleware.Option) *Function
- type Mapping
- type MappingOption
- type MappingRegistry
- func (r *MappingRegistry) GetHandler(ctx http.Context) (http.HandlerChain, bool)
- func (r *MappingRegistry) Handlers() map[*Mapping]any
- func (r *MappingRegistry) Register(mapping *Mapping, handler http.Handler, middlewares ...*middleware.Middleware)
- func (r *MappingRegistry) Unregister(mapping *Mapping)
- type Router
- type Routes
- func (r *Routes) Accept(mediaTypes ...string) *Routes
- func (r *Routes) Attribute(name string, val any) *Routes
- func (r *Routes) AttributeMap(attrs map[string]any) *Routes
- func (r *Routes) ContentType(mediaTypes ...string) *Routes
- func (r *Routes) DELETE(pattern string, handler http.Handler) *Function
- func (r *Routes) GET(pattern string, handler http.Handler) *Function
- func (r *Routes) HEAD(pattern string, handler http.Handler) *Function
- func (r *Routes) Nest(pattern string) *Routes
- func (r *Routes) OPTIONS(pattern string, handler http.Handler) *Function
- func (r *Routes) PATCH(pattern string, handler http.Handler) *Function
- func (r *Routes) POST(pattern string, handler http.Handler) *Function
- func (r *Routes) Route(method http.Method, handler http.Handler) *Function
- func (r *Routes) UseMiddleware(function middleware.Function, options ...middleware.Option) *Routes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
func (*Function) ContentType ¶
func (*Function) UseMiddleware ¶
func (r *Function) UseMiddleware(function middleware.Function, options ...middleware.Option) *Function
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
func NewMapping ¶
func NewMapping(pattern string, opts ...MappingOption) *Mapping
func (*Mapping) Attributes ¶
func (*Mapping) ContentTypes ¶
type MappingOption ¶
type MappingOption func(mapping *Mapping)
func WithAccepts ¶
func WithAccepts(accepts ...string) MappingOption
func WithContentTypes ¶
func WithContentTypes(contentTypes ...string) MappingOption
func WithMethod ¶
func WithMethod(methods ...http.Method) MappingOption
type MappingRegistry ¶
type MappingRegistry struct { }
func (*MappingRegistry) GetHandler ¶
func (r *MappingRegistry) GetHandler(ctx http.Context) (http.HandlerChain, bool)
func (*MappingRegistry) Handlers ¶
func (r *MappingRegistry) Handlers() map[*Mapping]any
func (*MappingRegistry) Register ¶
func (r *MappingRegistry) Register(mapping *Mapping, handler http.Handler, middlewares ...*middleware.Middleware)
func (*MappingRegistry) Unregister ¶
func (r *MappingRegistry) Unregister(mapping *Mapping)
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
func (*Routes) ContentType ¶
func (*Routes) UseMiddleware ¶
func (r *Routes) UseMiddleware(function middleware.Function, options ...middleware.Option) *Routes
Click to show internal directories.
Click to hide internal directories.