Documentation
¶
Index ¶
- Constants
- func AddHttpErr(code int, f http.HandlerFunc)
- func HttpErr(w http.ResponseWriter, r *http.Request, code int)
- type Business
- type Route
- type Router
- type Server
- func (this *Server) RouteDelete(pattern string, b Business)
- func (this *Server) RouteGet(pattern string, b Business)
- func (this *Server) RouteHead(pattern string, b Business)
- func (this *Server) RoutePatch(pattern string, b Business)
- func (this *Server) RoutePost(pattern string, b Business)
- func (this *Server) RoutePut(pattern string, b Business)
- func (this *Server) Serve()
- func (this *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (this *Server) ServeTLS(certFile string, keyFile string)
Constants ¶
View Source
const (
// cherry version.
VERSION = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
func AddHttpErr ¶
func AddHttpErr(code int, f http.HandlerFunc)
Types ¶
type Business ¶
type Business interface {
Init(resRoot string)
Handle(w http.ResponseWriter, r *http.Request)
}
type Server ¶
type Server struct {
Port int
WebRoot string
ResRoot string
Name string
// contains filtered or unexported fields
}
func (*Server) RouteDelete ¶
func (*Server) RoutePatch ¶
Click to show internal directories.
Click to hide internal directories.