1. 16 May, 2014 9 commits
    • astaxie's avatar
      beego: controller add ServeFormatted · 6bdf0838
      astaxie authored
      ServeFormatted serve Xml OR Json, depending on the value of the Accept
      header
      6bdf0838
    • astaxie's avatar
      session: support memcache interface · 31a63c5d
      astaxie authored
      31a63c5d
    • astaxie's avatar
      session:support struct. · 237aaadd
      astaxie authored
      gob.Register(v)
      237aaadd
    • astaxie's avatar
      beego: XSRF support Controller level fix #610 · 34ddcef1
      astaxie authored
      default value is true when you Enable Global XSRF, also can control in
      the prepare function to change the value.
      34ddcef1
    • astaxie's avatar
      beego: support namespace · f6ce2656
      astaxie authored
      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")))
      	}),
      )
      f6ce2656
    • slene's avatar
      orm: add test for unexported struct field · b647026d
      slene authored
      b647026d
    • slene's avatar
      Merge pull request #542 from kylemcc/develop · 568c0c47
      slene authored
      orm: allow unexported fields on model structs
      568c0c47
    • astaxie's avatar
      beego: support more router · 2629de28
      astaxie authored
      //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)
      }
      2629de28
    • astaxie's avatar
      config: fix the import issue · 10d2c7c3
      astaxie authored
      10d2c7c3
  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 4 commits