Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type RouteHandler ¶
type RouteHandler struct { Path string Method string HandlerFunc http.HandlerFunc }
type WebRouter ¶
type WebRouter struct { HelloWebHandler handlers.HelloWebHandlerInterface RateLimiterMiddleware middlewares.RateLimiterMiddlewareInterface }
func NewWebRouter ¶
func NewWebRouter( helloWebHandler handlers.HelloWebHandlerInterface, rateLimiterMiddleware middlewares.RateLimiterMiddlewareInterface, ) *WebRouter
func (*WebRouter) Build ¶
func (wr *WebRouter) Build() []RouteHandler
func (*WebRouter) BuildMiddlewares ¶
func (wr *WebRouter) BuildMiddlewares() []Middleware
type WebRouterInterface ¶
type WebRouterInterface interface {
Build() []RouteHandler
}
type WebServer ¶
type WebServer struct { Router chi.Router Handlers []RouteHandler Middlewares []Middleware WebServerPort int }
func NewWebServer ¶
func NewWebServer( serverPort int, handlers []RouteHandler, middlewares []Middleware, ) *WebServer
type WebServerInterface ¶
type WebServerInterface interface {
Start()
}
Click to show internal directories.
Click to hide internal directories.