Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeHTML = "text/html" ContentTypeImagePNG = "image/png" ContentTypeCSS = "text/css" ContentTypeJS = "text/javascript" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpAnswer ¶
func (*HttpAnswer) Send ¶
func (answer *HttpAnswer) Send(w http.ResponseWriter)
type HttpRegexp ¶
Регулярные выражения для проверки роутов
func (*HttpRegexp) Add ¶
func (reg *HttpRegexp) Add(pattern, regExpPattern string)
func (*HttpRegexp) Init ¶
func (reg *HttpRegexp) Init()
type HttpRouter ¶
type HttpRouter struct { Routes []HttpRoute DefaultNotFoundAnswer HttpAnswer HttpRegexp }
func (*HttpRouter) HandleFunc ¶
func (router *HttpRouter) HandleFunc(method, uri string, f func(http.ResponseWriter, *http.Request))
func (*HttpRouter) Init ¶
func (router *HttpRouter) Init()
func (*HttpRouter) ServeHTTP ¶
func (router *HttpRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.