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

package thinkgo

import "github.com/thinkoner/thinkgo"

Index

Package Files

pipeline.go response.go thinkgo.go utils.go view.go

func Html Uses

func Html(s string) *context.Response

Text Create a new HTTP Response with HTML data

func Json Uses

func Json(v interface{}) *context.Response

Json Create a new HTTP Response with JSON data

func Render Uses

func Render(name string, data interface{}) *context.Response

Render Create a new HTTP Response with the template

func Text Uses

func Text(s string) *context.Response

Text Create a new HTTP Response with TEXT data

type Pipeline Uses

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

func NewPipeline Uses

func NewPipeline() *Pipeline

Pipeline returns a new Pipeline

func (*Pipeline) Passable Uses

func (p *Pipeline) Passable(passable *context.Request) *Pipeline

Passable set the request being sent through the pipeline.

func (*Pipeline) Pipe Uses

func (p *Pipeline) Pipe(m app.Handler) *Pipeline

Pipe Push a Middleware Handler to the pipeline

func (*Pipeline) Run Uses

func (p *Pipeline) Run() interface{}

Run run the pipeline

func (*Pipeline) ServeHTTP Uses

func (p *Pipeline) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP

func (*Pipeline) Through Uses

func (p *Pipeline) Through(hls []app.Handler) *Pipeline

Pipe Batch push Middleware Handlers to the pipeline

type ThinkGo Uses

type ThinkGo struct {
    App *app.Application
    // contains filtered or unexported fields
}

func BootStrap Uses

func BootStrap() *ThinkGo

BootStrap Create The Application

func (*ThinkGo) RegisterConfig Uses

func (think *ThinkGo) RegisterConfig(register registerConfigFunc)

RegisterConfig Register Config

func (*ThinkGo) RegisterHandler Uses

func (think *ThinkGo) RegisterHandler(handler app.HandlerFunc)

RegisterConfig Register Config

func (*ThinkGo) RegisterRoute Uses

func (think *ThinkGo) RegisterRoute(register registerRouteFunc)

RegisterRoute Register Route

func (*ThinkGo) Run Uses

func (think *ThinkGo) Run(params ...string)

Run thinkgo application. Run() default run on HttpPort Run("localhost") Run(":9011") Run("127.0.0.1:9011")

type View Uses

type View interface {
    Render(name string, data interface{}) []byte
}

Directories

PathSynopsis
app
cache
config
context
filesystem
helper
log
log/formatter
log/handler
log/record
router
session
view

Package thinkgo imports 11 packages (graph). Updated 2019-04-10. Refresh now. Tools for package owners.