1. 16 May, 2014 6 commits
    • beego: XSRF support Controller level fix #610 · 34ddcef1
      default value is true when you Enable Global XSRF, also can control in
      the prepare function to change the value.
      astaxie committed
    • beego: support namespace · f6ce2656
      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")))
      	}),
      )
      astaxie committed
    • orm: add test for unexported struct field · b647026d
      slene committed
    • Merge pull request #542 from kylemcc/develop · 568c0c47
      orm: allow unexported fields on model structs
      slene committed
    • beego: support more router · 2629de28
      //design model
      	beego.Get(router, beego.FilterFunc)
      	beego.Post(router, beego.FilterFunc)
      	beego.Put(router, beego.FilterFunc)
      	beego.Head(router, beego.FilterFunc)
      	beego.Options(router, beego.FilterFunc)
      	beego.Delete(router, beego.FilterFunc)
      	beego.Handler(router, http.Handler)
      
      //example
      
      beego.Get("/user", func(ctx *context.Context) {
      	ctx.Output.Body([]byte("Get userlist"))
      })
      
      beego.Post("/user", func(ctx *context.Context) {
      	ctx.Output.Body([]byte("add userlist"))
      })
      
      beego.Delete("/user/:id", func(ctx *context.Context) {
      	ctx.Output.Body([]byte([]byte(ctx.Input.Param(":id")))
      })
      
      import (
          "http"
          "github.com/gorilla/rpc"
          "github.com/gorilla/rpc/json"
      )
      
      func init() {
          s := rpc.NewServer()
          s.RegisterCodec(json.NewCodec(), "application/json")
          s.RegisterService(new(HelloService), "")
          beego.Handler("/rpc", s)
      }
      astaxie committed
    • config: fix the import issue · 10d2c7c3
      astaxie committed
  2. 15 May, 2014 2 commits
  3. 14 May, 2014 2 commits
  4. 09 May, 2014 2 commits
  5. 08 May, 2014 2 commits
  6. 28 Apr, 2014 1 commit
  7. 14 Apr, 2014 2 commits
  8. 12 Apr, 2014 1 commit
  9. 11 Apr, 2014 1 commit
  10. 10 Apr, 2014 3 commits
  11. 09 Apr, 2014 7 commits
  12. 08 Apr, 2014 3 commits
  13. 07 Apr, 2014 1 commit
  14. 05 Apr, 2014 5 commits
  15. 04 Apr, 2014 2 commits