Documentation ¶
Index ¶
- func Html(s string) *context.Response
- func Json(v interface{}) *context.Response
- func Response(v interface{}) *context.Response
- func Text(s string) *context.Response
- type Application
- type Closure
- type Handler
- type HandlerFunc
- type RecoverHandler
- type Req
- type Res
- type Route
- type RouteHandler
- type SessionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct { Env string Debug bool Logger *log.Logger // contains filtered or unexported fields }
Application the ThinkGo Application
func NewApplication ¶
func NewApplication() *Application
NewApplication returns a new ThinkGo Application
func (*Application) GetRoute ¶
func (a *Application) GetRoute() *router.Route
GetRoute Get the router of the application
func (*Application) GetView ¶
func (a *Application) GetView() *view.View
GetView Get the view of the application
func (*Application) RegisterRoute ¶
func (a *Application) RegisterRoute(r *router.Route)
RegisterRoute Register Route for Application
func (*Application) RegisterView ¶
func (a *Application) RegisterView(v *view.View)
RegisterView Register View for Application
type Handler ¶
Handler Middleware Handler interface
func NewRecoverHandler ¶
func NewRecoverHandler(app *Application) Handler
NewRecoverHandler The default NewRecoverHandler
func NewRouteHandler ¶
func NewRouteHandler(app *Application) Handler
NewRouteHandler The default RouteHandler
func NewSessionHandler ¶
func NewSessionHandler(app *Application) Handler
SessionHandler The default SessionHandler
type HandlerFunc ¶
type HandlerFunc func(app *Application) Handler
HandlerFunc Handle the application.
type RecoverHandler ¶
type RecoverHandler struct {
// contains filtered or unexported fields
}
type RouteHandler ¶
type SessionHandler ¶
Click to show internal directories.
Click to hide internal directories.