astaxie
18a02d7d60
beego:support https & http listen
2014-05-20 15:30:17 +08:00
astaxie
92f6181616
beego: change the version to 1.2.0
2014-05-17 02:26:52 +08:00
astaxie
e657dcfd5f
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-17 02:26:51 +08:00
astaxie
55ad951bce
beego: support more router
...
//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)
}
2014-05-17 02:26:51 +08:00
astaxie
c188cbbcb4
update all files License
2014-05-17 02:26:50 +08:00
astaxie
f9cc9e9eb3
beego: release new version 1.1.4
2014-04-08 17:45:57 +08:00
astaxie
4124760706
beego: filter the static file's url
2014-04-07 14:20:30 +08:00
astaxie
5a863b45f4
beego: BeeAdminApp private
2014-04-06 01:02:10 +08:00
astaxie
3ad30d48b5
beego: fix the godoc
2014-04-06 00:53:18 +08:00
astaxie
7f394feab5
beego: hot fix for TestBeegoInit can't parsefile
2014-04-04 10:04:36 +08:00
astaxie
5c06cd090c
beego: hot fix for console logs & go run can't find file.
2014-04-04 09:56:25 +08:00
astaxie
fc982feeb9
fix go run hello.go & console log
2014-04-04 09:49:57 +08:00
astaxie
1705b42546
beego: change version from 1.1.1 to 1.1.2
2014-04-03 15:54:37 +08:00
asta.xie
5505cc09ed
beego: move init to a fund & add a new fund TestBeegoInit
...
support Test with everything init
2014-04-03 15:07:20 +08:00
asta.xie
745e9fb0fb
change version to 1.1.1
2014-03-12 21:24:23 +08:00
cnphpbb
0f015d75d2
Update beego.go - Modify GroupRouters all function
...
Modify the file beego.go.
Type GroupRouters all function
Slice types exist trap bug.
2014-03-12 16:50:13 +08:00
asta.xie
76222ac8d0
change 1.0.1 to 1.1.0
2014-02-10 11:33:53 +08:00
傅小黑
32799bc259
add comments for middleware packages, fix typo error
2014-01-17 16:03:01 +08:00
slene
3b99f37aa1
add a empty fake config Initialize AppConfig to avoid nil pointer runtime error.
2014-01-11 14:28:11 +08:00
sol lu
afadb3f6df
Update beego.go
2014-01-10 13:31:08 +08:00
astaxie
844412c302
fix #453
2014-01-09 21:37:50 +08:00
astaxie
31bdb793cf
make fix
2014-01-05 15:21:50 +08:00
astaxie
9cbd475701
beego support new version session
2014-01-05 14:59:39 +08:00
astaxie
d57557dc55
add AutoRouterWithPrefix
2014-01-01 17:57:57 +08:00
astaxie
803d91c077
support modules design!
...
// the follow code is write in modules:
// GR:=NewGroupRouters()
// GR.AddRouter("/login",&UserController,"get:Login")
// GR.AddRouter("/logout",&UserController,"get:Logout")
// GR.AddRouter("/register",&UserController,"get:Reg")
// the follow code is write in app:
// import "github.com/beego/modules/auth"
// AddRouterGroup("/admin", auth.GR)
2013-12-31 23:43:15 +08:00
astaxie
383a04f4c2
move initmime from beego.Run to hookfunc
2013-12-31 00:34:47 +08:00
astaxie
984b0cbf31
1. :all param default expr change from (.+) to (.*)
...
2. add hookfunc to support appstart hook
2013-12-30 15:06:51 +08:00
astaxie
cfcfeb7b99
change version from 1.0.0 to 1.0.1
2013-12-24 21:35:20 +08:00
傅小黑
933e98e4f2
add api comments in file beego.go
2013-12-20 19:36:54 +08:00
slene
7aa307bd24
fix: re-parse config in windows
2013-12-20 11:21:48 +08:00
astaxie
d718d9c8ee
beego 1.0 release
2013-12-19 21:09:45 +08:00
astaxie
505fca93c3
change version from 0.9.9 to 1.0.0 RC1
2013-12-15 21:54:57 +08:00
astaxie
1ea18adce8
add default mime type to fix #341
2013-12-07 15:16:32 +08:00
Pengfei Xue
420e816bed
panic if parse failed
2013-12-04 23:53:36 +08:00
astaxie
fb6312a303
reverse from pull 330
2013-12-04 17:03:49 +08:00
Pengfei Xue
12ade02f2d
panic if parse config failed
2013-12-03 19:56:30 +08:00
knightmare
47fc32ba47
add func InsertFilter(pattern string, pos int, filter FilterFunc) *App to replace AddFilter
...
pos can be const:
BeforeRouter = iota
AfterStatic
BeforeExec
AfterExec
FinishRouter
2013-11-25 15:59:40 +08:00
astaxie
6c13bdde25
support profile & statistics in another port
2013-11-13 21:11:09 +08:00
astaxie
23d79b8b05
#254 add SessionHashFunc SessionHashKey SessionCookieLifeTime
2013-11-03 21:41:07 +08:00
astaxie
c1b2e1d0ca
fix #238
2013-10-28 23:30:16 +08:00
astaxie
93e1206d60
xsrf change to randstr and cookie set to security cookie
2013-09-25 23:05:53 +08:00
astaxie
3c1d23bc62
#207
2013-09-19 23:40:55 +08:00
astaxie
42958ddd41
update version from 0.9.0 to 0.9.9
2013-09-13 17:45:26 +08:00
astaxie
9f6b803a10
update middleware & beego's error
2013-09-11 17:00:39 +08:00
astaxie
bd61dd9ffc
change a log about new version
2013-09-10 00:00:18 +08:00
astaxie
0b74db64eb
fix typo for templateLeft
2013-08-19 13:02:18 +08:00
astaxie
f2222ba3c6
support fastcgi
2013-08-19 11:23:53 +08:00
astaxie
3cb8a96041
support unix socket fix #151
...
You can set
HttpAddr="/tmp/beego.sock"
HttpPort=0
2013-08-19 11:21:02 +08:00
astaxie
4f538e7fd2
fix #163
...
you can set the delimiter like this
beego.TemplateLeft="{#"
beego.TemplateRight="#}"
or can set the config file like app.ini
templateleft={#
templateright=#}
2013-08-19 10:41:09 +08:00
benlovell
1977d87d55
Merge branch 'master' of https://github.com/astaxie/beego into spelling
2013-08-14 09:07:51 +02:00
benlovell
9cbefacf52
Fixes some minor spelling mistakes and typos
2013-08-14 09:06:40 +02:00
astaxie
42f1d1aeef
change version 0.8 to 0.9
2013-08-14 10:53:22 +08:00
astaxie
eb06435f23
change position GOMAXPROCS to init that user can set own GOMAXPROCS
2013-08-12 12:46:59 +08:00
astaxie
50f3bd5835
add filter after
2013-08-12 00:14:42 +08:00
astaxie
10f4e822c3
add XSRFExpire
2013-08-07 11:22:23 +08:00
astaxie
f9a31ea00a
EnableXSRF
2013-08-06 23:21:52 +08:00
astaxie
f7e7fab6f2
support autorouter
2013-07-27 10:25:14 +08:00
astaxie
23deaedd39
add to beego
2013-07-25 15:50:16 +08:00
astaxie
b32b12b208
add some comments
2013-07-25 15:40:33 +08:00
astaxie
e88c2be013
update docs & update beego's version
2013-07-25 15:37:38 +08:00
astaxie
7bfb4126d7
support copy requestbody
2013-07-08 23:12:31 +08:00
astaxie
2abe584bc5
support restful router
2013-07-08 18:35:10 +08:00
astaxie
d2a16ff8f6
fix #26 add xsrf function
2013-07-08 16:17:08 +08:00
astaxie
11977f4f77
fix #90
2013-07-07 17:58:50 +08:00
astaxie
75af664511
change r.ParseMultipartForm position
2013-07-04 23:41:35 +08:00
astaxie
9b392a0601
update to hotupdate's connet timeout
2013-07-03 16:58:15 +08:00
astaxie
bf9de3bcf6
add HttpServerTimeOut setting
2013-07-03 15:29:54 +08:00
astaxie
d627ec013e
add config to countol if enable hotupdate
2013-06-28 22:09:08 +08:00
astaxie
1521842d7a
add static global function & add seocms example
2013-06-25 18:49:08 +08:00
astaxie
b04813e472
fix #80
...
add a function to delete default StaticPath
2013-06-25 17:21:19 +08:00
astaxie
309f2e199b
add tag to 0.7.0
2013-06-25 11:42:18 +08:00
astaxie
c5a23d5cde
fix #81
2013-06-24 23:24:33 +08:00
astaxie
455367769e
support hot-update
2013-06-07 17:48:14 +08:00
astaxie
98b245c746
change version from 0.5 to 0.6
2013-05-13 23:42:10 +08:00
astaxie
581bb65bbc
improve parseconfig
2013-05-07 23:16:56 +08:00
astaxie
490747a8ae
fix #52
2013-05-07 23:06:51 +08:00
astaxie
1e7c1a265e
fix #16
2013-05-07 00:17:25 +08:00
astaxie
93babc5780
fix #48
2013-05-05 23:04:12 +08:00
astaxie
140b513c7b
support gzip #37
2013-04-18 23:13:53 +08:00
astaxie
99b09b2e7a
fix set sessiongcmaxlifetime #36
2013-04-18 09:42:42 +08:00
astaxie
b9017829ba
#35
2013-04-16 21:35:55 +08:00
astaxie
764798d601
add to function & write docs
2013-04-14 23:20:38 +08:00
astaxie
ee9b8b6aa9
fix when in linux system not in the app dir
2013-04-12 13:58:14 +08:00
astaxie
ddc3d7d58c
beego default set GOMAXPROCS to NumCPU
2013-04-11 11:17:18 +08:00
astaxie
cf60a3f463
warn views can't find when runmode is dev
2013-04-11 11:07:32 +08:00
astaxie
894634d4e6
version change to 0.5.0
2013-04-10 00:27:53 +08:00
astaxie
f9e8b4f124
fix multipart & add three useful function
...
c.GetString()
c. GetInt()
c.GetBool()
2013-04-09 21:49:17 +08:00
astaxie
3ad639e739
support websocket #20
...
add example chat
2013-04-08 00:28:32 +08:00
astaxie
2573696860
session
...
1. session move from astaxie/session to beego/session
2. support 4 type session
2013-04-05 23:50:53 +08:00
astaxie
69f40ad18a
add some useful function
...
1. Router
2. SetSession/GetSession/DelSession
3. RenderString
4. str2html/htmlquote/htmlunquote
5. move the template Function to util.go
2013-04-03 23:37:59 +08:00
astaxie
74d8952c5a
changer version to 0.4
2013-04-03 11:14:55 +08:00
astaxie
4ef5883f9e
if template not exist
2013-03-21 21:55:54 +08:00
astaxie
3b89071360
add template test and cache module
2013-03-14 00:14:09 +08:00
Jason Lee
53f917c99c
Fix wrong method name call for FilterPrefixPath.
2013-03-01 13:32:23 +08:00
深蓝
b8e7a46fc1
add fcgi support
2013-01-10 20:22:00 +08:00
xiemengjun
45710c3a3b
add TemplateCache
2013-01-06 10:15:14 +08:00
xiemengjun
aa4b66b985
fix session's maslifetime bug
2013-01-02 00:06:44 +08:00
xiemengjun
1530e3fbc2
add session support
2013-01-01 23:11:15 +08:00
xiemengjun
3e3abb7b6b
add support goroutine pprof
2012-12-27 22:42:16 +08:00
xiemengjun
c967f2d63f
add pprof support
2012-12-27 22:27:26 +08:00