Documentation ¶
Index ¶
- func RequestName(r *http.Request) string
- func RequestNameX(r *http.Request, xRemoteAddress string) string
- func RouteName(method, uri string) string
- func WebSocketName(name string) string
- type DomainMux
- func (o *DomainMux) DefaultHandler(h http.Handler)
- func (o *DomainMux) Handler(domain string, h http.Handler)
- func (o *DomainMux) PureReverseProxy(domain string, target string) error
- func (o *DomainMux) ReverseProxy(domain string, target string) error
- func (o *DomainMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type DualServer
- func (o *DualServer) Run(addr string, addrTls string, handler http.Handler) error
- func (o *DualServer) Shutdown()
- func (o *DualServer) WithAutoRedirectToTls() *DualServer
- func (o *DualServer) WithAutoSecret(dir string, domains ...string) *DualServer
- func (o *DualServer) WithLogErrors(use bool) *DualServer
- func (o *DualServer) WithLogErrorsLevel(level ulog.Level) *DualServer
- func (o *DualServer) WithLogRequests(use bool) *DualServer
- func (o *DualServer) WithOnTlsConfig(f func(*tls.Config) *tls.Config) *DualServer
- func (o *DualServer) WithRedirectToTls(use string) *DualServer
- func (o *DualServer) WithSecret(certFile, keyFile string) *DualServer
- func (o *DualServer) WithSecretDir(dir string) *DualServer
- func (o *DualServer) WithTimeout(t Timeout) *DualServer
- func (o *DualServer) WithXRemoteAddress(s string) *DualServer
- type OnRequest
- type OnWebsocket
- type Router
- func (o Router) Branch(path string) *Router
- func (o *Router) Delete(path string, onRequest OnRequest)
- func (o *Router) Files(files fs.FS)
- func (o *Router) Get(path string, onRequest OnRequest)
- func (o *Router) Handle(method string, path string, onRequest OnRequest)
- func (o *Router) IsRoot() bool
- func (o *Router) Log() *ulog.Log
- func (o *Router) Options(path string, onRequest OnRequest)
- func (o *Router) Post(path string, onRequest OnRequest)
- func (o *Router) Put(path string, onRequest OnRequest)
- func (o *Router) Router() *mux.Router
- func (o *Router) Uri(path string) string
- func (o *Router) WebSocket(path string, onWebsocket OnWebsocket)
- func (o *Router) WithID(id any) *Router
- func (o *Router) WithLogRequest(logRequest bool) *Router
- func (o *Router) WithUpgradeErrorLevel(level ulog.Level) *Router
- func (o *Router) WithXRemoteAddress(s string) *Router
- type Server
- func (o *Server) IsTls() bool
- func (o *Server) LogRequest(mux http.Handler) http.Handler
- func (o *Server) Run(addr string, handler http.Handler)
- func (o *Server) Shutdown()
- func (o *Server) WithAutoSecret(dir string, domains ...string) *Server
- func (o *Server) WithLogErrors(use bool) *Server
- func (o *Server) WithLogErrorsLevel(level ulog.Level) *Server
- func (o *Server) WithLogRequests(use bool) *Server
- func (o *Server) WithOnTlsConfig(f func(*tls.Config) *tls.Config) *Server
- func (o *Server) WithSecret(certFile, keyFile string) *Server
- func (o *Server) WithSecretDir(dir string) *Server
- func (o *Server) WithTimeout(timeout Timeout) *Server
- func (o *Server) WithXRemoteAddress(s string) *Server
- type Timeout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestName ¶ added in v0.1.14
func RequestNameX ¶ added in v0.2.63
func WebSocketName ¶ added in v0.1.14
Types ¶
type DomainMux ¶ added in v0.5.28
type DomainMux struct {
// contains filtered or unexported fields
}
func NewDomainMux ¶ added in v0.5.28
func NewDomainMux() *DomainMux
func (*DomainMux) DefaultHandler ¶ added in v0.5.28
func (*DomainMux) PureReverseProxy ¶ added in v0.5.28
func (*DomainMux) ReverseProxy ¶ added in v0.5.28
type DualServer ¶
type DualServer struct {
// contains filtered or unexported fields
}
func NewDual ¶
func NewDual() *DualServer
func (*DualServer) Shutdown ¶
func (o *DualServer) Shutdown()
func (*DualServer) WithAutoRedirectToTls ¶ added in v0.5.27
func (o *DualServer) WithAutoRedirectToTls() *DualServer
func (*DualServer) WithAutoSecret ¶ added in v0.1.27
func (o *DualServer) WithAutoSecret(dir string, domains ...string) *DualServer
func (*DualServer) WithLogErrors ¶ added in v0.1.78
func (o *DualServer) WithLogErrors(use bool) *DualServer
func (*DualServer) WithLogErrorsLevel ¶ added in v0.1.78
func (o *DualServer) WithLogErrorsLevel(level ulog.Level) *DualServer
func (*DualServer) WithLogRequests ¶ added in v0.1.78
func (o *DualServer) WithLogRequests(use bool) *DualServer
func (*DualServer) WithOnTlsConfig ¶ added in v0.7.21
func (o *DualServer) WithOnTlsConfig(f func(*tls.Config) *tls.Config) *DualServer
func (*DualServer) WithRedirectToTls ¶ added in v0.1.53
func (o *DualServer) WithRedirectToTls(use string) *DualServer
func (*DualServer) WithSecret ¶
func (o *DualServer) WithSecret(certFile, keyFile string) *DualServer
func (*DualServer) WithSecretDir ¶
func (o *DualServer) WithSecretDir(dir string) *DualServer
func (*DualServer) WithTimeout ¶ added in v0.6.4
func (o *DualServer) WithTimeout(t Timeout) *DualServer
func (*DualServer) WithXRemoteAddress ¶ added in v0.2.65
func (o *DualServer) WithXRemoteAddress(s string) *DualServer
type Router ¶ added in v0.1.8
type Router struct {
// contains filtered or unexported fields
}
func (*Router) WebSocket ¶ added in v0.1.8
func (o *Router) WebSocket(path string, onWebsocket OnWebsocket)
func (*Router) WithLogRequest ¶ added in v0.1.14
func (*Router) WithUpgradeErrorLevel ¶ added in v0.1.89
func (*Router) WithXRemoteAddress ¶ added in v0.2.64
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) LogRequest ¶ added in v0.1.78
func (*Server) WithAutoSecret ¶ added in v0.1.27
func (*Server) WithLogErrors ¶ added in v0.1.78
func (*Server) WithLogErrorsLevel ¶ added in v0.1.78
func (*Server) WithLogRequests ¶ added in v0.1.78
func (*Server) WithOnTlsConfig ¶ added in v0.7.21
func (*Server) WithSecret ¶ added in v0.1.27
func (*Server) WithSecretDir ¶ added in v0.1.27
func (*Server) WithTimeout ¶ added in v0.6.3
func (*Server) WithXRemoteAddress ¶ added in v0.2.65
Click to show internal directories.
Click to hide internal directories.