Documentation ¶
Index ¶
- type Router
- func (r *Router) Close()
- func (r *Router) EnableBasicAuth(username, password string)
- func (r *Router) EnableCORS(allowCredentials bool, allowOrigins []string, allowMethods []string, ...)
- func (r *Router) EnableGZIPCompression(level int)
- func (r *Router) EnableSwagger()
- func (r *Router) GetPProf(c echo.Context) error
- func (r *Router) HTTPErrorHandler(err error, c echo.Context)
- func (r *Router) ServeFrontend(env configtypes.Environment) error
- func (r *Router) ServeImages(dir string)
- func (r *Router) UseOpenTelemetry()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct { *echo.Echo // contains filtered or unexported fields }
Router is our HTTP router which contains echo.Echo, database.DB and WebSocket as injected dependencies.
func New ¶
func New( websocket *websocket.WebSocket, middlewareConfig configmodels.HTTPMiddleware, ) (*Router, error)
New creates a new router instance intialized with pre-defined routes for web use.
func (*Router) EnableBasicAuth ¶
func (*Router) EnableCORS ¶
func (*Router) EnableGZIPCompression ¶
func (*Router) EnableSwagger ¶
func (r *Router) EnableSwagger()
func (*Router) HTTPErrorHandler ¶
func (*Router) ServeFrontend ¶
func (r *Router) ServeFrontend(env configtypes.Environment) error
func (*Router) ServeImages ¶
func (*Router) UseOpenTelemetry ¶
func (r *Router) UseOpenTelemetry()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.