1
0
mirror of https://github.com/astaxie/beego.git synced 2025-01-22 18:07:12 +00:00
astaxie f6ce2656db beego: support namespace
ns := beego.NewNamespace("/v1/api/")
ns.Cond(func(ctx *context.Context)bool{
	    if ctx.Input.Domain() == "www.beego.me" {
	    	return true
	    }
	    return false
	})
.Filter("before", Authenticate)
.Router("/order",	&admin.OrderController{})
.Get("/version",func (ctx *context.Context) {
	ctx.Output.Body([]byte("1.0.0"))
})
.Post("/login",func (ctx *context.Context) {
	if ctx.Query("username") == "admin" && ctx.Query("username") ==
"password" {

	}
})
.Namespace(
	NewNamespace("/shop").
		Get("/order/:id", func(ctx *context.Context) {
		ctx.Output.Body([]byte(ctx.Input.Param(":id")))
	}),
)
2014-05-16 23:47:29 +08:00
2014-04-12 13:18:18 +08:00
2014-05-16 10:18:19 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-15 05:03:20 +08:00
2014-05-16 23:47:29 +08:00
2014-05-16 23:47:29 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-05-08 10:51:29 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-05-16 23:47:29 +08:00
2014-05-16 23:47:29 +08:00
2014-01-15 09:40:33 +08:00
2014-04-12 13:18:18 +08:00
2014-05-16 10:18:19 +08:00
2014-05-16 23:47:29 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00
2014-04-12 13:18:18 +08:00

beego

Build Status

beego is a Go Framework inspired by tornado and sinatra.

It is a simple & powerful web framework.

More info beego.me

Features

  • RESTful support
  • MVC architecture
  • Session support (store in memory, file, Redis or MySQL)
  • Cache support (store in memory, Redis or Memcache)
  • Global Config
  • Intelligent routing
  • Thread-safe map
  • Friendly displaying of errors
  • Useful template functions

Documentation

English

API

中文文档

LICENSE

beego is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).

[Clone in Koding][koding] [koding]: https://koding.com/Teamwork?import=https://github.com/astaxie/beego/archive/master.zip&c=git1

Description
beego mirror
Readme 9.4 MiB
Languages
Go 99.6%
Shell 0.4%