Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoRouter ¶
type EchoRouter struct {
// contains filtered or unexported fields
}
func (*EchoRouter) AddRoute ¶
func (r *EchoRouter) AddRoute(method RouteMethod, path string, handler http.Handler)
func (*EchoRouter) Handler ¶
func (r *EchoRouter) Handler() http.Handler
func (*EchoRouter) ListenAndServe ¶
func (r *EchoRouter) ListenAndServe(address string) error
type EchoRouterConfig ¶
type RouteMethod ¶
type RouteMethod string
const ( GET RouteMethod = "GET" POST RouteMethod = "POST" PUT RouteMethod = "PUT" DELETE RouteMethod = "DELETE" OPTIONS RouteMethod = "OPTIONS" ANY RouteMethod = "ANY" HealthPath = "/health" MetricsPath = "/metrics" )
type Router ¶
type Router interface { AddRoute(method RouteMethod, path string, handler http.Handler) Handler() http.Handler ListenAndServe(address string) error }
func NewEchoRouter ¶
func NewEchoRouter(config EchoRouterConfig) (Router, error)
Click to show internal directories.
Click to hide internal directories.