1. 16 May, 2014 36 commits
    • astaxie's avatar
      merger master · cf04ade6
      astaxie authored
      cf04ade6
    • astaxie's avatar
      beego: change the version to 1.2.0 · 92f61816
      astaxie authored
      92f61816
    • astaxie's avatar
      beego: admin support link · 9270a050
      astaxie authored
      9270a050
    • astaxie's avatar
      beego: controller add ServeFormatted · 1da37f6c
      astaxie authored
      ServeFormatted serve Xml OR Json, depending on the value of the Accept
      header
      1da37f6c
    • astaxie's avatar
      session: support memcache interface · ef6d9b9a
      astaxie authored
      ef6d9b9a
    • astaxie's avatar
      session:support struct. · c2657862
      astaxie authored
      gob.Register(v)
      c2657862
    • astaxie's avatar
      beego: XSRF support Controller level fix #610 · c5c806b5
      astaxie authored
      default value is true when you Enable Global XSRF, also can control in
      the prepare function to change the value.
      c5c806b5
    • astaxie's avatar
      beego: support namespace · e657dcfd
      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")))
      	}),
      )
      e657dcfd
    • slene's avatar
      orm: add test for unexported struct field · 2ed9b2bf
      slene authored
      2ed9b2bf
    • astaxie's avatar
      beego: support more router · 55ad951b
      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)
      }
      55ad951b
    • astaxie's avatar
      config: fix the import issue · ef815bf5
      astaxie authored
      ef815bf5
    • jessonchan's avatar
      bug fixed · 6082a0af
      jessonchan authored
      6082a0af
    • jessonchan's avatar
      refator func · be30fb79
      jessonchan authored
      be30fb79
    • toby.zxj's avatar
    • astaxie's avatar
      httplib:support file upload · 14688f24
      astaxie authored
      14688f24
    • astaxie's avatar
      fix the typo · dce09837
      astaxie authored
      dce09837
    • astaxie's avatar
      beego: support other analisys & fix typo · 3b9a4041
      astaxie authored
      3b9a4041
    • astaxie's avatar
      beego: add link in the admin console · a6f55b59
      astaxie authored
      a6f55b59
    • astaxie's avatar
      update all files License · c188cbbc
      astaxie authored
      c188cbbc
    • astaxie's avatar
      fix #576 · 42455216
      astaxie authored
      42455216
    • astaxie's avatar
      beego:add post test case · 05e5baaa
      astaxie authored
      05e5baaa
    • astaxie's avatar
      context:add Bind function · 54b92e95
      astaxie authored
      // Bind data from request.Form[key] to dest
      // like
      /?id=123&isok=true&ft=1.2&ol[0]=1&ol[1]=2&ul[]=str&ul[]=array&user.Name=
      astaxie
      // var id int  beegoInput.Bind(&id, "id")  id ==123
      // var isok bool  beegoInput.Bind(&isok, "isok")  id ==true
      // var ft float64  beegoInput.Bind(&ft, "ft")  ft ==1.2
      // ol := make([]int, 0, 2)  beegoInput.Bind(&ol, "ol")  ol ==[1 2]
      // ul := make([]string, 0, 2)  beegoInput.Bind(&ul, "ul")  ul ==[str
      array]
      // user struct{Name}  beegoInput.Bind(&user, "user")  user ==
      {Name:"astaxie"}
      54b92e95
    • astaxie's avatar
      aa68ffec
    • Lin Luxiang's avatar
      make Maxage work · 78991c81
      Lin Luxiang authored
      78991c81
    • Donald Zhan's avatar
      update the error message · 348ff138
      Donald Zhan authored
      348ff138
    • Kyle McCullough's avatar
      allow unexported fields on model structs · 52817fb6
      Kyle McCullough authored
      52817fb6
    • astaxie's avatar
      beego: admin support link · 2c59ff1c
      astaxie authored
      2c59ff1c
    • 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