Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PostMiddleware = func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { c.Response().WriteHeader(http.StatusNoContent) _, _ = c.Response().Writer.Write(nil) return nil } }
View Source
var PreMiddleware = func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { c.Response().Header().Set("Server", ServerInfo) return next(c) } }
View Source
var ReadHeaderTimeout = 10 * time.Second
View Source
var ServerInfo = "Turna"
Functions ¶
Types ¶
type Certificate ¶ added in v0.3.5
type HTTP ¶
type HTTP struct { Routers map[string]Router `cfg:"routers"` Middlewares map[string]HTTPMiddleware `cfg:"middlewares"` TLS TLS `cfg:"tls"` }
type HTTPMiddleware ¶
type HTTPMiddleware struct { AddPrefixMiddleware *middlewares.AddPrefix `cfg:"add_prefix"` AuthMiddleware *middlewares.Auth `cfg:"auth"` InjectMiddleware *middlewares.Inject `cfg:"inject"` HelloMiddleware *middlewares.Hello `cfg:"hello"` TemplateMiddleware *middlewares.Template `cfg:"template"` InfoMiddleware *middlewares.Info `cfg:"info"` SetMiddleware *middlewares.Set `cfg:"set"` StripPrefixMiddleware *middlewares.StripPrefix `cfg:"strip_prefix"` RoleMiddleware *middlewares.Role `cfg:"role"` ScopeMiddleware *middlewares.Scope `cfg:"scope"` ServiceMiddleware *middlewares.Service `cfg:"service"` FolderMiddleware *middlewares.Folder `cfg:"folder"` BasicAuthMiddleware *middlewares.BasicAuth `cfg:"basic_auth"` CorsMiddleware *middlewares.Cors `cfg:"cors"` HeadersMiddleware *middlewares.Headers `cfg:"headers"` BlockMiddleware *middlewares.Block `cfg:"block"` RegexPathMiddleware *middlewares.RegexPath `cfg:"regex_path"` GzipMiddleware *middlewares.Gzip `cfg:"gzip"` DecompressMiddleware *middlewares.Decompress `cfg:"decompress"` LogMiddleware *middlewares.Log `cfg:"log"` PrintMiddleware *middlewares.Print `cfg:"print"` LoginMiddleware *login.Login `cfg:"login"` SessionMiddleware *session.Session `cfg:"session"` ViewMiddleware *view.View `cfg:"view"` RequestMiddleware *middlewares.Request `cfg:"request"` RedirectionMiddleware *middlewares.Redirection `cfg:"redirection"` TryMiddleware *middlewares.Try `cfg:"try"` SessionInfoMiddleware *sessioninfo.Info `cfg:"session_info"` OpenFgaMiddleware *openfga.OpenFGA `cfg:"openfga"` OpenFgaCheckMiddleware *openfgacheck.OpenFGACheck `cfg:"openfga_check"` RoleCheckMiddleware *rolecheck.RoleCheck `cfg:"role_check"` RoleDataMiddleware *roledata.RoleData `cfg:"role_data"` TokenPassMiddleware *middlewares.TokenPass `cfg:"token_pass"` RedirectContinueMiddleware *middlewares.RedirectionContinue `cfg:"redirect_continue"` }
type Router ¶
type RuleRouter ¶ added in v0.3.6
type RuleRouter struct {
// contains filtered or unexported fields
}
func NewRuleRouter ¶ added in v0.3.6
func NewRuleRouter() *RuleRouter
func (*RuleRouter) GetEcho ¶ added in v0.3.6
func (s *RuleRouter) GetEcho(r RuleSelection) *echo.Echo
func (RuleRouter) Serve ¶ added in v0.3.6
func (s RuleRouter) Serve(entrypoint string) http.Handler
Serve implements the http.Handler interface with changing entrypoint selection.
func (*RuleRouter) ServeHTTP ¶ added in v0.3.6
func (s *RuleRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*RuleRouter) SetRule ¶ added in v0.3.6
func (s *RuleRouter) SetRule(selection RuleSelection)
type RuleSelection ¶ added in v0.3.6
type TLS ¶ added in v0.3.5
type TLS struct {
Store map[string][]Certificate `cfg:"store"`
}
Click to show internal directories.
Click to hide internal directories.