Documentation
¶
Index ¶
- Constants
- func DisallowUnknownFields()
- func UseNumber()
- type Context
- type HTTPServer
- func (h *HTTPServer) AddRouter(method, path string, handleFunc HandleFunc)
- func (h *HTTPServer) CONNECT(path string, handleFunc HandleFunc)
- func (h *HTTPServer) DELETE(path string, handleFunc HandleFunc)
- func (h *HTTPServer) GET(path string, handleFunc HandleFunc)
- func (h *HTTPServer) HEAD(path string, handleFunc HandleFunc)
- func (h *HTTPServer) OPTIONS(path string, handleFunc HandleFunc)
- func (h *HTTPServer) PATCH(path string, handleFunc HandleFunc)
- func (h *HTTPServer) POST(path string, handleFunc HandleFunc)
- func (h *HTTPServer) PUT(path string, handleFunc HandleFunc)
- func (h *HTTPServer) Run(addr string) error
- func (h *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *HTTPServer) TRACE(path string, handleFunc HandleFunc)
- type HandleFunc
- type Server
Constants ¶
View Source
const ( START = "*" ROD = "/" )
View Source
const ( SWEAT = ':' SYMBOL = '@' )
Variables ¶
This section is empty.
Functions ¶
func DisallowUnknownFields ¶
func DisallowUnknownFields()
Types ¶
type Context ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewVIX ¶
func NewVIX() *HTTPServer
func (*HTTPServer) AddRouter ¶
func (h *HTTPServer) AddRouter(method, path string, handleFunc HandleFunc)
func (*HTTPServer) CONNECT ¶
func (h *HTTPServer) CONNECT(path string, handleFunc HandleFunc)
CONNECT Connect请求
func (*HTTPServer) DELETE ¶
func (h *HTTPServer) DELETE(path string, handleFunc HandleFunc)
DELETE Delete请求
func (*HTTPServer) OPTIONS ¶
func (h *HTTPServer) OPTIONS(path string, handleFunc HandleFunc)
OPTIONS Options请求
func (*HTTPServer) PATCH ¶
func (h *HTTPServer) PATCH(path string, handleFunc HandleFunc)
PATCH Patch请求
func (*HTTPServer) Run ¶
func (h *HTTPServer) Run(addr string) error
func (*HTTPServer) ServeHTTP ¶
func (h *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP 处理HTTP请求的入口
func (*HTTPServer) TRACE ¶
func (h *HTTPServer) TRACE(path string, handleFunc HandleFunc)
TRACE Trace请求
Click to show internal directories.
Click to hide internal directories.