Documentation
¶
Index ¶
- Constants
- func CheckSSL(certPath string, keyPath string) error
- func GenerateSSL(options map[string]string) error
- type Connections
- type HandlerWrapper
- func Download(re string, view handler) *HandlerWrapper
- func Favicon(path string) *HandlerWrapper
- func Humans(data string) *HandlerWrapper
- func Redirect(path, destination string, code int) *HandlerWrapper
- func Robots(data string) *HandlerWrapper
- func SSE(re string, hub *Connections, ch chan string) *HandlerWrapper
- func StaticFiles(reqpath string, paths ...string) *HandlerWrapper
- func URL(re string, view handler, handler mimeCtrl) *HandlerWrapper
- type WebServer
- func (GWV *WebServer) ConfigSSL(port int, sslkey string, sslcert string, spdy bool)
- func (GWV *WebServer) Handler404(fn handler)
- func (GWV *WebServer) Handler500(fn handler)
- func (GWV *WebServer) InitLogChan()
- func (GWV *WebServer) InitRealtimeHub() *Connections
- func (GWV *WebServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (GWV *WebServer) Start()
- func (GWV *WebServer) URLhandler(patterns ...*HandlerWrapper)
Constants ¶
View Source
const ( AUTO mimeCtrl = iota HTML JSON ICON PLAIN REDIRECT DOWNLOAD )
Variables ¶
This section is empty.
Functions ¶
func GenerateSSL ¶
Types ¶
type Connections ¶
type Connections struct {
// contains filtered or unexported fields
}
type HandlerWrapper ¶ added in v0.2.0
type HandlerWrapper struct {
// contains filtered or unexported fields
}
func Download ¶
func Download(re string, view handler) *HandlerWrapper
func Favicon ¶
func Favicon(path string) *HandlerWrapper
func Humans ¶
func Humans(data string) *HandlerWrapper
func Redirect ¶
func Redirect(path, destination string, code int) *HandlerWrapper
func Robots ¶
func Robots(data string) *HandlerWrapper
func SSE ¶
func SSE(re string, hub *Connections, ch chan string) *HandlerWrapper
func StaticFiles ¶
func StaticFiles(reqpath string, paths ...string) *HandlerWrapper
func URL ¶
func URL(re string, view handler, handler mimeCtrl) *HandlerWrapper
func (*HandlerWrapper) String ¶ added in v0.2.0
func (u *HandlerWrapper) String() string
type WebServer ¶
type WebServer struct { WG sync.WaitGroup Stop bool LogChan chan string // contains filtered or unexported fields }
func (*WebServer) Handler404 ¶
func (GWV *WebServer) Handler404(fn handler)
func (*WebServer) Handler500 ¶
func (GWV *WebServer) Handler500(fn handler)
func (*WebServer) InitLogChan ¶ added in v0.2.0
func (GWV *WebServer) InitLogChan()
func (*WebServer) InitRealtimeHub ¶
func (GWV *WebServer) InitRealtimeHub() *Connections
func (*WebServer) ServeHTTP ¶
func (GWV *WebServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*WebServer) URLhandler ¶
func (GWV *WebServer) URLhandler(patterns ...*HandlerWrapper)
Click to show internal directories.
Click to hide internal directories.