Documentation ¶
Overview ¶
Router
* 2 * @Author: Nico 3 * @Date: 2020/11/8 17:53 4
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Router ¶
func Router(url string, middleware ...HandlerFunc) *router
Types ¶
type ContentType ¶
type ContentType string
const ( ContentTypePostForm ContentType = "application/x-www-form-urlencoded" ContentTypeFormData ContentType = "multipart/form-data" ContentTypeJSON ContentType = "application/json" ContentTypeXML ContentType = "application/xml" )
type Driver ¶
type Driver interface { Run(addr ...string) error Handle(method Method, url string, middleware ...HandlerFunc) }
type HandlerFunc ¶
type HandlerFunc interface{}
type JSON ¶
type JSON interface { Marshal(v interface{}) ([]byte, error) Unmarshal(data []byte, v interface{}) error }
func DefaultJSON ¶
func DefaultJSON() JSON
Source Files ¶
Click to show internal directories.
Click to hide internal directories.