Migrate to dep (#3972)

* Update makefile to use dep

* Migrate to dep

* Fix some deps

* Try to find a better version for golang.org/x/net

* Try to find a better version for golang.org/x/oauth2
This commit is contained in:
Antoine GIRARD 2018-05-21 14:34:20 +02:00 committed by Lauris BH
parent d7fd9bf7bb
commit 3f3383dc0a
281 changed files with 12024 additions and 32676 deletions

View file

@ -1,16 +0,0 @@
# 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.

View file

@ -1,20 +0,0 @@
# 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.

View file

@ -1,20 +0,0 @@
# 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.

View file

@ -1 +0,0 @@
ignore

View file

@ -1 +0,0 @@
ignore

View file

@ -1,16 +0,0 @@
# 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.

View file

@ -1,18 +0,0 @@
# 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.

View file

@ -1,20 +0,0 @@
# gzip [![Build Status](https://travis-ci.org/go-macaron/gzip.svg?branch=master)](https://travis-ci.org/go-macaron/gzip) [![](http://gocover.io/_badge/github.com/go-macaron/gzip)](http://gocover.io/github.com/go-macaron/gzip)
Middleware gzip provides compress to responses for [Macaron](https://github.com/go-macaron/macaron).
### Installation
go get github.com/go-macaron/gzip
## Getting Help
- [API Reference](https://gowalker.org/github.com/go-macaron/gzip)
- [Documentation](http://go-macaron.com/docs/middlewares/gzip)
## Credits
This package is a modified version of [martini-contrib/gzip](https://github.com/martini-contrib/gzip).
## License
This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.

View file

@ -1,16 +0,0 @@
# 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.

View file

@ -1,11 +0,0 @@
# 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.

View file

@ -1,20 +0,0 @@
# session [![Build Status](https://travis-ci.org/go-macaron/session.svg?branch=master)](https://travis-ci.org/go-macaron/session) [![](http://gocover.io/_badge/github.com/go-macaron/session)](http://gocover.io/github.com/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
go get github.com/go-macaron/session
## Getting Help
- [API Reference](https://gowalker.org/github.com/go-macaron/session)
- [Documentation](http://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.

View file

@ -1 +0,0 @@
ignore

View file

@ -1,110 +0,0 @@
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.
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.