diff options
Diffstat (limited to 'vendor/github.com/go-macaron')
28 files changed, 370 insertions, 0 deletions
diff --git a/vendor/github.com/go-macaron/bindata/.travis.yml b/vendor/github.com/go-macaron/bindata/.travis.yml new file mode 100644 index 0000000000..2774fb35d5 --- /dev/null +++ b/vendor/github.com/go-macaron/bindata/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/bindata/README.md b/vendor/github.com/go-macaron/bindata/README.md new file mode 100644 index 0000000000..fd32bf3fb5 --- /dev/null +++ b/vendor/github.com/go-macaron/bindata/README.md @@ -0,0 +1,16 @@ +# bindata [![Build Status](https://travis-ci.org/go-macaron/bindata.svg?branch=master)](https://travis-ci.org/go-macaron/bindata) [![](http://gocover.io/_badge/github.com/go-macaron/bindata)](http://gocover.io/github.com/go-macaron/bindata) + +Package bindata is a helper module that allows to use in-memory static and template files for Macaron via [go-bindata](https://github.com/jteeuwen/go-bindata). + +### Installation + + go get github.com/go-macaron/bindata + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/bindata) +- [Documentation](http://go-macaron.com/docs/middlewares/bindata) + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/binding/.gitignore b/vendor/github.com/go-macaron/binding/.gitignore new file mode 100644 index 0000000000..485dee64bc --- /dev/null +++ b/vendor/github.com/go-macaron/binding/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/vendor/github.com/go-macaron/binding/.travis.yml b/vendor/github.com/go-macaron/binding/.travis.yml new file mode 100644 index 0000000000..2462c6e19d --- /dev/null +++ b/vendor/github.com/go-macaron/binding/.travis.yml @@ -0,0 +1,15 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/binding/README.md b/vendor/github.com/go-macaron/binding/README.md new file mode 100644 index 0000000000..a6748b57a1 --- /dev/null +++ b/vendor/github.com/go-macaron/binding/README.md @@ -0,0 +1,20 @@ +# binding [![Build Status](https://travis-ci.org/go-macaron/binding.svg?branch=master)](https://travis-ci.org/go-macaron/binding) [![](http://gocover.io/_badge/github.com/go-macaron/binding)](http://gocover.io/github.com/go-macaron/binding) + +Middleware binding provides request data binding and validation for [Macaron](https://github.com/go-macaron/macaron). + +### Installation + + go get github.com/go-macaron/binding + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/binding) +- [Documentation](http://go-macaron.com/docs/middlewares/binding) + +## Credits + +This package is a modified version of [martini-contrib/binding](https://github.com/martini-contrib/binding). + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/cache/.gitignore b/vendor/github.com/go-macaron/cache/.gitignore new file mode 100644 index 0000000000..69067d55d5 --- /dev/null +++ b/vendor/github.com/go-macaron/cache/.gitignore @@ -0,0 +1,3 @@ +nodb/cache +ledis/tmp.db/ +nodb/tmp.db/
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/cache/.travis.yml b/vendor/github.com/go-macaron/cache/.travis.yml new file mode 100644 index 0000000000..2774fb35d5 --- /dev/null +++ b/vendor/github.com/go-macaron/cache/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/cache/README.md b/vendor/github.com/go-macaron/cache/README.md new file mode 100644 index 0000000000..d27aa93b67 --- /dev/null +++ b/vendor/github.com/go-macaron/cache/README.md @@ -0,0 +1,20 @@ +# cache [![Build Status](https://travis-ci.org/go-macaron/cache.svg?branch=master)](https://travis-ci.org/go-macaron/cache) [![](http://gocover.io/_badge/github.com/go-macaron/cache)](http://gocover.io/github.com/go-macaron/cache) + +Middleware cache provides cache management for [Macaron](https://github.com/go-macaron/macaron). It can use many cache adapters, including memory, file, Redis, Memcache, PostgreSQL, MySQL, Ledis and Nodb. + +### Installation + + go get github.com/go-macaron/cache + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/cache) +- [Documentation](http://go-macaron.com/docs/middlewares/cache) + +## Credits + +This package is a modified version of [beego/cache](https://github.com/astaxie/beego/tree/master/cache). + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/cache/memcache/memcache.goconvey b/vendor/github.com/go-macaron/cache/memcache/memcache.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/cache/memcache/memcache.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/cache/redis/redis.goconvey b/vendor/github.com/go-macaron/cache/redis/redis.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/cache/redis/redis.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/captcha/.travis.yml b/vendor/github.com/go-macaron/captcha/.travis.yml new file mode 100644 index 0000000000..2774fb35d5 --- /dev/null +++ b/vendor/github.com/go-macaron/captcha/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/captcha/README.md b/vendor/github.com/go-macaron/captcha/README.md new file mode 100644 index 0000000000..5eab6f3feb --- /dev/null +++ b/vendor/github.com/go-macaron/captcha/README.md @@ -0,0 +1,16 @@ +# captcha [![Build Status](https://travis-ci.org/go-macaron/captcha.svg?branch=master)](https://travis-ci.org/go-macaron/captcha) + +Middleware captcha provides captcha service for [Macaron](https://github.com/go-macaron/macaron). + +### Installation + + go get github.com/go-macaron/captcha + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/captcha) +- [Documentation](http://go-macaron.com/docs/middlewares/captcha) + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/csrf/.travis.yml b/vendor/github.com/go-macaron/csrf/.travis.yml new file mode 100644 index 0000000000..8d6a90868c --- /dev/null +++ b/vendor/github.com/go-macaron/csrf/.travis.yml @@ -0,0 +1,11 @@ +sudo: false +language: go +go: + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + +script: go test -v -cover -race diff --git a/vendor/github.com/go-macaron/csrf/README.md b/vendor/github.com/go-macaron/csrf/README.md new file mode 100644 index 0000000000..ff3e10a013 --- /dev/null +++ b/vendor/github.com/go-macaron/csrf/README.md @@ -0,0 +1,18 @@ +# csrf [![Build Status](https://travis-ci.org/go-macaron/csrf.svg?branch=master)](https://travis-ci.org/go-macaron/csrf) [![](http://gocover.io/_badge/github.com/go-macaron/csrf)](http://gocover.io/github.com/go-macaron/csrf) + +Middleware csrf generates and validates CSRF tokens for [Macaron](https://github.com/go-macaron/macaron). + +[API Reference](https://gowalker.org/github.com/go-macaron/csrf) + +### Installation + + go get github.com/go-macaron/csrf + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/csrf) +- [Documentation](http://go-macaron.com/docs/middlewares/csrf) + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/i18n/.travis.yml b/vendor/github.com/go-macaron/i18n/.travis.yml new file mode 100644 index 0000000000..2774fb35d5 --- /dev/null +++ b/vendor/github.com/go-macaron/i18n/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/i18n/README.md b/vendor/github.com/go-macaron/i18n/README.md new file mode 100644 index 0000000000..737c0b9950 --- /dev/null +++ b/vendor/github.com/go-macaron/i18n/README.md @@ -0,0 +1,16 @@ +# i18n [![Build Status](https://travis-ci.org/go-macaron/i18n.svg?branch=master)](https://travis-ci.org/go-macaron/i18n) [![](http://gocover.io/_badge/github.com/go-macaron/i18n)](http://gocover.io/github.com/go-macaron/i18n) + +Middleware i18n provides app Internationalization and Localization for [Macaron](https://github.com/go-macaron/macaron). + +### Installation + + go get github.com/go-macaron/i18n + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/i18n) +- [Documentation](http://go-macaron.com/docs/middlewares/i18n) + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/inject/.travis.yml b/vendor/github.com/go-macaron/inject/.travis.yml new file mode 100644 index 0000000000..2774fb35d5 --- /dev/null +++ b/vendor/github.com/go-macaron/inject/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - tip + +script: go test -v -cover -race + +notifications: + email: + - u@gogs.io diff --git a/vendor/github.com/go-macaron/inject/README.md b/vendor/github.com/go-macaron/inject/README.md new file mode 100644 index 0000000000..c65c76955d --- /dev/null +++ b/vendor/github.com/go-macaron/inject/README.md @@ -0,0 +1,11 @@ +# inject [![Build Status](https://travis-ci.org/go-macaron/inject.svg?branch=master)](https://travis-ci.org/go-macaron/inject) [![](http://gocover.io/_badge/github.com/go-macaron/inject)](http://gocover.io/github.com/go-macaron/inject) + +Package inject provides utilities for mapping and injecting dependencies in various ways. + +**This a modified version of [codegangsta/inject](https://github.com/codegangsta/inject) for special purpose of Macaron** + +**Please use the original version if you need dependency injection feature** + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/.gitignore b/vendor/github.com/go-macaron/session/.gitignore new file mode 100644 index 0000000000..9297dbcd7c --- /dev/null +++ b/vendor/github.com/go-macaron/session/.gitignore @@ -0,0 +1,2 @@ +ledis/tmp.db +nodb/tmp.db
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/.travis.yml b/vendor/github.com/go-macaron/session/.travis.yml new file mode 100644 index 0000000000..bc978bae7f --- /dev/null +++ b/vendor/github.com/go-macaron/session/.travis.yml @@ -0,0 +1,9 @@ +sudo: false +language: go +go: + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x + +script: go test -v -cover -race diff --git a/vendor/github.com/go-macaron/session/README.md b/vendor/github.com/go-macaron/session/README.md new file mode 100644 index 0000000000..fe4f4ba1b3 --- /dev/null +++ b/vendor/github.com/go-macaron/session/README.md @@ -0,0 +1,22 @@ +# session [![Build Status](https://travis-ci.org/go-macaron/session.svg?branch=master)](https://travis-ci.org/go-macaron/session) + +Middleware session provides session management for [Macaron](https://github.com/go-macaron/macaron). It can use many session providers, including memory, file, Redis, Memcache, PostgreSQL, MySQL, Couchbase, Ledis and Nodb. + +### Installation + +The minimum requirement of Go is 1.6 (*1.7 if using Redis, 1.8 if using MySQL*). + + go get github.com/go-macaron/session + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/session) +- [Documentation](https://go-macaron.com/docs/middlewares/session) + +## Credits + +This package is a modified version of [beego/session](https://github.com/astaxie/beego/tree/master/session). + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/memcache/memcache.goconvey b/vendor/github.com/go-macaron/session/memcache/memcache.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/session/memcache/memcache.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/mysql/mysql.goconvey b/vendor/github.com/go-macaron/session/mysql/mysql.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/session/mysql/mysql.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/nodb/nodb.goconvey b/vendor/github.com/go-macaron/session/nodb/nodb.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/session/nodb/nodb.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/postgres/postgres.goconvey b/vendor/github.com/go-macaron/session/postgres/postgres.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/session/postgres/postgres.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/session/redis/redis.goconvey b/vendor/github.com/go-macaron/session/redis/redis.goconvey new file mode 100644 index 0000000000..8485e986e4 --- /dev/null +++ b/vendor/github.com/go-macaron/session/redis/redis.goconvey @@ -0,0 +1 @@ +ignore
\ No newline at end of file diff --git a/vendor/github.com/go-macaron/toolbox/.gitignore b/vendor/github.com/go-macaron/toolbox/.gitignore new file mode 100644 index 0000000000..c3265c1186 --- /dev/null +++ b/vendor/github.com/go-macaron/toolbox/.gitignore @@ -0,0 +1,2 @@ +profile/ +/.idea diff --git a/vendor/github.com/go-macaron/toolbox/README.md b/vendor/github.com/go-macaron/toolbox/README.md new file mode 100644 index 0000000000..72769a06ea --- /dev/null +++ b/vendor/github.com/go-macaron/toolbox/README.md @@ -0,0 +1,111 @@ +toolbox +======= + +Middleware toolbox provides health chcek, pprof, profile and statistic services for [Macaron](https://github.com/go-macaron/macaron). + +[API Reference](https://gowalker.org/github.com/go-macaron/toolbox) + +### Installation + + go get github.com/go-macaron/toolbox + +## Usage + +```go +// main.go +import ( + "gopkg.in/macaron.v1" + "github.com/go-macaron/toolbox" +) + +func main() { + m := macaron.Classic() + m.Use(toolbox.Toolboxer(m)) + m.Run() +} +``` + +Open your browser and visit `http://localhost:4000/debug` to see the effects. + +## Options + +`toolbox.Toolboxer` comes with a variety of configuration options: + +```go +type dummyChecker struct { +} + +func (dc *dummyChecker) Desc() string { + return "Dummy checker" +} + +func (dc *dummyChecker) Check() error { + return nil +} + +// ... +m.Use(toolbox.Toolboxer(m, toolbox.Options{ + URLPrefix: "/debug", // URL prefix for toolbox dashboard + HealthCheckURL: "/healthcheck", // URL for health check request + HealthCheckers: []HealthChecker{ + new(dummyChecker), + }, // Health checkers + HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{ + &toolbox.HealthCheckFuncDesc{ + Desc: "Database connection", + Func: func() error { return "OK" }, + }, + }, // Health check functions + DisableDebug: false, // Turns off all debug functionality when true + PprofURLPrefix: "/debug/pprof/", // URL prefix of pprof + ProfileURLPrefix: "/debug/profile/", // URL prefix of profile + ProfilePath: "profile", // Path store profile files +})) +// ... +``` + +## Route Statistic + +Toolbox also comes with a route call statistic functionality: + +```go +import ( + "os" + "time" + //... + "github.com/go-macaron/toolbox" +) + +func main() { + //... + m.Get("/", func(t toolbox.Toolbox) { + start := time.Now() + + // Other operations. + + t.AddStatistics("GET", "/", time.Since(start)) + }) + + m.Get("/dump", func(t toolbox.Toolbox) { + t.GetMap(os.Stdout) + }) +} +``` + +Output take from test: + +``` ++---------------------------------------------------+------------+------------------+------------------+------------------+------------------+------------------+ +| Request URL | Method | Times | Total Used(s) | Max Used(μs) | Min Used(μs) | Avg Used(μs) | ++---------------------------------------------------+------------+------------------+------------------+------------------+------------------+------------------+ +| /api/user | POST | 2 | 0.000122 | 120.000000 | 2.000000 | 61.000000 | +| /api/user | GET | 1 | 0.000013 | 13.000000 | 13.000000 | 13.000000 | +| /api/user | DELETE | 1 | 0.000001 | 1.400000 | 1.400000 | 1.400000 | +| /api/admin | POST | 1 | 0.000014 | 14.000000 | 14.000000 | 14.000000 | +| /api/user/unknwon | POST | 1 | 0.000012 | 12.000000 | 12.000000 | 12.000000 | ++---------------------------------------------------+------------+------------------+------------------+------------------+------------------+------------------+ +``` + +## License + +This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text.
\ No newline at end of file |