Documentation
¶
Index ¶
- Constants
- 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) GetAddress() string
- func (app *Application) GetAppName() string
- func (app *Application) GetLogPath() string
- func (app *Application) GetProxy() bool
- func (app *Application) GetViewPath() string
- 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() error
- func (app *Application) SetAddress(address string) *Application
- func (app *Application) SetAppName(appName string) *Application
- func (app *Application) SetLogPath(logPath string) *Application
- func (app *Application) SetPanicHandler(panicHandler PanicHandler) *Application
- func (app *Application) SetProxy(proxy bool) *Application
- func (app *Application) SetViewPath(viewPath string) *Application
- 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) GetUserAgent() string
- func (c *Context) IsSecure() bool
- func (c *Context) Json(data map[string]interface{})
- func (c *Context) Parse(object interface{}) error
- func (c *Context) Redirect(url string, code int)
- func (c *Context) Render(tmpFile string, data map[string]interface{})
- 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
- type NotFoundHandle
- type PanicHandler
Constants ¶
View Source
const ( HTTP_METHOD_GET = "GET" HTTP_METHOD_HEAD = "HEAD" HTTP_METHOD_OPTIONS = "OPTIONS" HTTP_METHOD_POST = "POST" HTTP_METHOD_PUT = "PUT" HTTP_METHOD_PATCH = "PATCH" HTTP_METHOD_DELETE = "DELETE" )
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() *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) GetAddress ¶ added in v1.0.2
func (app *Application) GetAddress() string
func (*Application) GetAppName ¶ added in v1.0.2
func (app *Application) GetAppName() string
func (*Application) GetLogPath ¶ added in v1.0.2
func (app *Application) GetLogPath() string
func (*Application) GetProxy ¶
func (app *Application) GetProxy() bool
func (*Application) GetViewPath ¶ added in v1.0.2
func (app *Application) GetViewPath() string
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() error
func (*Application) SetAddress ¶ added in v1.0.2
func (app *Application) SetAddress(address string) *Application
func (*Application) SetAppName ¶ added in v1.0.2
func (app *Application) SetAppName(appName string) *Application
func (*Application) SetLogPath ¶ added in v1.0.2
func (app *Application) SetLogPath(logPath string) *Application
func (*Application) SetPanicHandler ¶ added in v1.0.2
func (app *Application) SetPanicHandler(panicHandler PanicHandler) *Application
func (*Application) SetProxy ¶ added in v1.0.2
func (app *Application) SetProxy(proxy bool) *Application
func (*Application) SetViewPath ¶ added in v1.0.2
func (app *Application) SetViewPath(viewPath string) *Application
func (*Application) StaticFiles ¶
func (app *Application) StaticFiles(prefix, path string) *Application
func (*Application) Use ¶
func (app *Application) Use(m Middleware) *Application
type Context ¶
func (*Context) GetHeaders ¶
func (*Context) GetHostname ¶
func (*Context) GetParamDefault ¶
func (*Context) GetProtocol ¶
func (*Context) GetQuerystring ¶
func (*Context) GetUserAgent ¶ added in v1.0.2
type Middleware ¶
type NotFoundHandle ¶ added in v1.0.2
type NotFoundHandle func(w http.ResponseWriter, r *http.Request)
func (NotFoundHandle) ServeHTTP ¶ added in v1.0.2
func (f NotFoundHandle) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PanicHandler ¶ added in v1.0.2
type PanicHandler func(http.ResponseWriter, *http.Request, interface{})
Click to show internal directories.
Click to hide internal directories.