thinkgo: github.com/thinkoner/thinkgo/app Index | Files

package app

import "github.com/thinkoner/thinkgo/app"

Index

Package Files

app.go handler.go route_hendler.go session_handler.go

type Application Uses

type Application struct {
    // contains filtered or unexported fields
}

Application the ThinkGo Application

func NewApplication Uses

func NewApplication() *Application

NewApplication returns a new ThinkGo Application

func (*Application) GetRoute Uses

func (a *Application) GetRoute() *router.Route

GetRoute Get the router of the application

func (*Application) GetView Uses

func (a *Application) GetView() *view.View

GetView Get the view of the application

func (*Application) RegisterRoute Uses

func (a *Application) RegisterRoute(r *router.Route)

RegisterRoute Register Route for Application

func (*Application) RegisterView Uses

func (a *Application) RegisterView(v *view.View)

RegisterView Register View for Application

type Closure Uses

type Closure func(req *context.Request) interface{}

Closure Anonymous function, Used in Middleware Handler

type Handler Uses

type Handler interface {
    Process(request *context.Request, next Closure) interface{}
}

Handler Middleware Handler interface

func NewRouteHandler Uses

func NewRouteHandler(app *Application) Handler

NewRouteHandler The default RouteHandler

func NewSessionHandler Uses

func NewSessionHandler(app *Application) Handler

SessionHandler The default SessionHandler

type HandlerFunc Uses

type HandlerFunc func(app *Application) Handler

HandlerFunc Handle the application.

type RouteHandler Uses

type RouteHandler struct {
    Route *router.Route
}

func (*RouteHandler) Process Uses

func (h *RouteHandler) Process(request *context.Request, next Closure) interface{}

Process Process the request to a router and return the response.

type SessionHandler Uses

type SessionHandler struct {
    // contains filtered or unexported fields
}

func (*SessionHandler) Process Uses

func (h *SessionHandler) Process(req *context.Request, next Closure) interface{}

Package app imports 5 packages (graph) and is imported by 1 packages. Updated 2019-01-21. Refresh now. Tools for package owners.