Documentation ¶
Index ¶
- Variables
- type EndPoint
- func (a *EndPoint) Delete(h ...Handler)
- func (a *EndPoint) Get(h ...Handler)
- func (a *EndPoint) Head(h ...Handler)
- func (a *EndPoint) Patch(h ...Handler)
- func (a *EndPoint) Post(h ...Handler)
- func (a *EndPoint) Put(h ...Handler)
- func (a *EndPoint) Sub(e *EndPoint) *EndPoint
- func (a *EndPoint) URL() string
- type Handler
- type Router
Constants ¶
This section is empty.
Variables ¶
var RESERVED_ENDPOINTS = map[string]struct{}{
"public": {},
"private": {},
"doc": {},
"docs": {},
}
Functions ¶
This section is empty.
Types ¶
type EndPoint ¶ added in v0.23.24
func NewEndPoint ¶ added in v0.23.24
func NewRootPoint ¶ added in v0.23.24
func NewRootPoint() *EndPoint
type Handler ¶ added in v0.23.24
Handler définit le type de fonction qui implémente HandlerInterface.
type Router ¶ added in v0.23.24
type Router struct {
// contains filtered or unexported fields
}
Router represents your API. It manages the association of URL paths with their corresponding handlers based on HTTP methods like GET, POST, PUT, PATCH, and DELETE. The Router also keeps track of whether it is deprecated.
func MakeRouter ¶ added in v0.23.24
func MakeRouter() *Router
MakeRouter creates and returns a new instance of Router. This function initializes a Router with its default values.
Returns: - *Router: A new instance of Router.
func (*Router) Resolve ¶ added in v0.23.24
Resolve process the request and applies appropriate handlers
This function takes a router and an exchange object. It resolves the endpoint from the request, then applies the corresponding handlers based on the request method.
Parameters: - exchange: *transport.Exchange The exchange object containing request and response.
Returns: - err: error The error encountered during processing, if any.