gin: github.com/gin-gonic/gin/ginS Index | Files

package ginS

import "github.com/gin-gonic/gin/ginS"

Index

Package Files

gins.go

func Any Uses

func Any(relativePath string, handlers ...HandlerFunc) IRoutes

func DELETE Uses

func DELETE(relativePath string, handlers ...HandlerFunc) IRoutes

DELETE is a shortcut for router.Handle("DELETE", path, handle)

func GET Uses

func GET(relativePath string, handlers ...HandlerFunc) IRoutes

GET is a shortcut for router.Handle("GET", path, handle)

func Group Uses

func Group(relativePath string, handlers ...HandlerFunc) *RouterGroup

Group creates a new router group. You should add all the routes that have common middlwares or the same path prefix. For example, all the routes that use a common middlware for authorization could be grouped.

func HEAD(relativePath string, handlers ...HandlerFunc) IRoutes

HEAD is a shortcut for router.Handle("HEAD", path, handle)

func Handle Uses

func Handle(httpMethod, relativePath string, handlers ...HandlerFunc) IRoutes

func LoadHTMLFiles Uses

func LoadHTMLFiles(files ...string)

func LoadHTMLGlob Uses

func LoadHTMLGlob(pattern string)

func NoMethod Uses

func NoMethod(handlers ...HandlerFunc)

NoMethod sets the handlers called when... TODO

func NoRoute Uses

func NoRoute(handlers ...HandlerFunc)

NoRoute adds handlers for NoRoute. It return a 404 code by default.

func OPTIONS Uses

func OPTIONS(relativePath string, handlers ...HandlerFunc) IRoutes

OPTIONS is a shortcut for router.Handle("OPTIONS", path, handle)

func PATCH Uses

func PATCH(relativePath string, handlers ...HandlerFunc) IRoutes

PATCH is a shortcut for router.Handle("PATCH", path, handle)

func POST Uses

func POST(relativePath string, handlers ...HandlerFunc) IRoutes

POST is a shortcut for router.Handle("POST", path, handle)

func PUT Uses

func PUT(relativePath string, handlers ...HandlerFunc) IRoutes

PUT is a shortcut for router.Handle("PUT", path, handle)

func Run Uses

func Run(addr ...string) (err error)

Run : The router is attached to a http.Server and starts listening and serving HTTP requests. It is a shortcut for http.ListenAndServe(addr, router) Note: this method will block the calling goroutine undefinitelly unless an error happens.

func RunTLS Uses

func RunTLS(addr string, certFile string, keyFile string) (err error)

RunTLS : The router is attached to a http.Server and starts listening and serving HTTPS requests. It is a shortcut for http.ListenAndServeTLS(addr, certFile, keyFile, router) Note: this method will block the calling goroutine undefinitelly unless an error happens.

func RunUnix Uses

func RunUnix(file string) (err error)

RunUnix : The router is attached to a http.Server and starts listening and serving HTTP requests through the specified unix socket (ie. a file) Note: this method will block the calling goroutine undefinitelly unless an error happens.

func SetHTMLTemplate Uses

func SetHTMLTemplate(templ *template.Template)

func Static Uses

func Static(relativePath, root string) IRoutes

Static serves files from the given file system root. Internally a http.FileServer is used, therefore http.NotFound is used instead of the Router's NotFound handler. To use the operating system's file system implementation, use :

router.Static("/static", "/var/www")

func StaticFS Uses

func StaticFS(relativePath string, fs http.FileSystem) IRoutes

func StaticFile Uses

func StaticFile(relativePath, filepath string) IRoutes

func Use Uses

func Use(middlewares ...HandlerFunc) IRoutes

Use attachs a global middleware to the router. ie. the middlewares attached though Use() will be included in the handlers chain for every single request. Even 404, 405, static files... For example, this is the right place for a logger or error management middleware.

Package ginS imports 4 packages (graph). Updated 2016-11-10. Refresh now. Tools for package owners.