Documentation
¶
Index ¶
- type Application
- func (app *Application) ALL(path string, handler Handler) *Application
- func (app *Application) DELETE(path string, handler Handler) *Application
- func (app *Application) GET(path string, handler Handler) *Application
- func (app *Application) GetProxy() bool
- func (app *Application) HEAD(path string, handler Handler) *Application
- func (app *Application) OPTIONS(path string, handler Handler) *Application
- func (app *Application) PATCH(path string, handler Handler) *Application
- func (app *Application) POST(path string, handler Handler) *Application
- func (app *Application) PUT(path string, handler Handler) *Application
- func (app *Application) Run(addr string) error
- func (app *Application) StaticFiles(prefix, path string) *Application
- func (app *Application) Use(m Middleware) *Application
- type Context
- func (c *Context) Body(body string)
- func (c *Context) Download(filePath string)
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetHeaders() map[string][]string
- func (c *Context) GetHost() string
- func (c *Context) GetHostname() string
- func (c *Context) GetHref() string
- func (c *Context) GetLength() int
- func (c *Context) GetMethod() string
- func (c *Context) GetOrigin() string
- func (c *Context) GetParam(key string) (value string)
- func (c *Context) GetParamDefault(key, defaultValue string) (value string)
- func (c *Context) GetProtocol() string
- func (c *Context) GetQuery() url.Values
- func (c *Context) GetQuerystring() string
- func (c *Context) GetUri() string
- func (c *Context) IsSecure() bool
- func (c *Context) JsonResponse(data map[string]interface{})
- func (c *Context) ParseStructure(object interface{})
- func (c *Context) Redirect(url string, code int)
- func (c *Context) SetHeader(key, value string) *Context
- func (c *Context) SetLength(length int) *Context
- func (c *Context) SetStatus(code int) *Context
- type Handler
- type Middleware
- type Next
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(proxy bool) *Application
func (*Application) ALL ¶
func (app *Application) ALL(path string, handler Handler) *Application
func (*Application) DELETE ¶
func (app *Application) DELETE(path string, handler Handler) *Application
func (*Application) GET ¶
func (app *Application) GET(path string, handler Handler) *Application
func (*Application) GetProxy ¶
func (app *Application) GetProxy() bool
func (*Application) HEAD ¶
func (app *Application) HEAD(path string, handler Handler) *Application
func (*Application) OPTIONS ¶
func (app *Application) OPTIONS(path string, handler Handler) *Application
func (*Application) PATCH ¶
func (app *Application) PATCH(path string, handler Handler) *Application
func (*Application) POST ¶
func (app *Application) POST(path string, handler Handler) *Application
func (*Application) PUT ¶
func (app *Application) PUT(path string, handler Handler) *Application
func (*Application) Run ¶
func (app *Application) Run(addr string) error
func (*Application) StaticFiles ¶
func (app *Application) StaticFiles(prefix, path string) *Application
func (*Application) Use ¶
func (app *Application) Use(m Middleware) *Application
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) GetHeaders ¶
func (*Context) GetHostname ¶
func (*Context) GetParamDefault ¶
func (*Context) GetProtocol ¶
func (*Context) GetQuerystring ¶
func (*Context) JsonResponse ¶
func (*Context) ParseStructure ¶
func (c *Context) ParseStructure(object interface{})
type Middleware ¶
Click to show internal directories.
Click to hide internal directories.