Documentation ¶
Index ¶
- Constants
- func LoggerMiddleware(logger *zerolog.Logger) func(next http.Handler) http.Handler
- func ReadConfigAndPrepare(configDir string, c interface{}) error
- func ReverseProxy(r *http.Request, w http.ResponseWriter, urlTarget string)
- func SendError(w http.ResponseWriter, err error, statusCode int, code, message string)
- type APIServer
- type Config
- type ErrResponse
- type Log
- type RouteManager
- type RouteManagerAPI
- type Server
Constants ¶
View Source
const (
DebugLog = "debug"
)
View Source
const (
ErrorServerInternal = "server.internal.error"
)
Variables ¶
This section is empty.
Functions ¶
func LoggerMiddleware ¶
func ReadConfigAndPrepare ¶
func ReverseProxy ¶
func ReverseProxy(r *http.Request, w http.ResponseWriter, urlTarget string)
Types ¶
type ErrResponse ¶
type RouteManager ¶
type RouteManagerAPI ¶
type RouteManagerAPI struct {
// contains filtered or unexported fields
}
func NewRouteManagerAPI ¶
func NewRouteManagerAPI(config *Config) (*RouteManagerAPI, error)
func (*RouteManagerAPI) AddExtraRoutes ¶
func (rm *RouteManagerAPI) AddExtraRoutes(r *chi.Mux) error
Click to show internal directories.
Click to hide internal directories.