Documentation
¶
Index ¶
- func RequestName(r *http.Request) string
- func RouteName(method, uri string) string
- func WebSocketName(name string) string
- type DualServer
- func (o *DualServer) Run(addr string, addrTls string, handler http.Handler) error
- func (o *DualServer) Shutdown()
- func (o *DualServer) WithAutoSecret(dir string, domains ...string) *DualServer
- func (o *DualServer) WithRedirectToTls(tlsRedirect string) *DualServer
- func (o *DualServer) WithSecret(certFile, keyFile string) *DualServer
- func (o *DualServer) WithSecretDir(dir 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) WebSocket(path string, onWebsocket OnWebsocket)
- func (o *Router) WithID(id any) *Router
- func (o *Router) WithLogRequest(logRequest bool) *Router
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestName ¶ added in v0.1.14
func WebSocketName ¶ added in v0.1.14
Types ¶
type DualServer ¶
type DualServer struct {
// contains filtered or unexported fields
}
func NewDual ¶
func NewDual() *DualServer
func (*DualServer) Shutdown ¶
func (o *DualServer) Shutdown()
func (*DualServer) WithAutoSecret ¶ added in v0.1.27
func (o *DualServer) WithAutoSecret(dir string, domains ...string) *DualServer
func (*DualServer) WithRedirectToTls ¶ added in v0.1.53
func (o *DualServer) WithRedirectToTls(tlsRedirect string) *DualServer
func (*DualServer) WithSecret ¶
func (o *DualServer) WithSecret(certFile, keyFile string) *DualServer
func (*DualServer) WithSecretDir ¶
func (o *DualServer) WithSecretDir(dir string) *DualServer
type OnWebsocket ¶ added in v0.1.8
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
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) WithAutoSecret ¶ added in v0.1.27
func (*Server) WithSecret ¶ added in v0.1.27
func (*Server) WithSecretDir ¶ added in v0.1.27
Click to show internal directories.
Click to hide internal directories.