forgejo/vendor/github.com
Lunny Xiao 6433ba0ec3
Move macaron to chi (#14293)
Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR.

- [x] Define `context.ResponseWriter` interface with an implementation `context.Response`.
- [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before.
- [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic .
- [x] Use https://github.com/unrolled/render instead of macaron's internal render
- [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip
- [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK**
- [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha
- [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache
- [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding
- [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors
- [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation`
- [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle.
- [x] Removed macaron log service because it's not need any more. **BREAK**
- [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition.
- [x] Move Git HTTP protocol implementation to use routers directly.
- [x] Fix the problem that chi routes don't support trailing slash but macaron did.
- [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. 

Notices:
- Chi router don't support request with trailing slash
- Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI.

Co-authored-by: 6543 <6543@obermui.de>
2021-01-26 16:36:53 +01:00
..
alecthomas/chroma [Vendor] Update Batch 2020-11 (#13746) 2020-11-29 15:54:08 -05:00
andybalholm Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
anmitsu/go-shlex Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
asaskevich/govalidator [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
aymerick/douceur upgrade to most recent bluemonday (#11007) 2020-04-07 23:08:47 +03:00
Azure/go-ntlmssp [Vendor] Update go-ldap to v3.2.4 (#13163) 2020-10-15 15:27:33 -04:00
beorn7/perks Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
blevesearch Upgrade blevesearch dependency to v2.0.1 (#14346) 2021-01-17 20:21:14 -05:00
boombuler/barcode Update github.com/pquerna/otp from untagged to v1.2.0 (#11358) 2020-05-10 15:50:16 +03:00
bradfitz/gomemcache Use gitea forked macaron (#7933) 2019-08-23 12:40:29 -04:00
caddyserver/certmagic Use caddy's certmagic library for extensible/robust ACME handling (#14177) 2021-01-25 01:37:35 +02:00
cespare/xxhash/v2 Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
chris-ramon/douceur upgrade to most recent bluemonday (#11007) 2020-04-07 23:08:47 +03:00
couchbase Fix recovery middleware to render gitea style page. (#13857) 2021-01-05 21:05:40 +08:00
cpuguy83/go-md2man/v2 Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
danwakefield/fnmatch Server-side syntax highlighting for all code (#12047) 2020-07-01 00:34:03 +03:00
davecgh/go-spew Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
denisenkom/go-mssqldb Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
dgrijalva/jwt-go workaround broken drone build (#7362) 2019-07-06 16:16:43 +01:00
dlclark/regexp2 Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
dsnet/compress Dump: add output format tar and output to stdout (#10376) 2020-06-05 16:47:39 -04:00
dustin/go-humanize Show download count info in release list (#10124) 2020-02-03 21:50:37 +02:00
editorconfig/editorconfig-core-go/v2 [Vendor] Update Batch 2020-11 (#13746) 2020-11-29 15:54:08 -05:00
emirpasic/gods Implement git refs API for listing references (branches, tags and other) (#5354) 2018-11-27 16:52:20 -05:00
ethantkoenig/rupture Upgrade blevesearch dependency to v2.0.1 (#14346) 2021-01-17 20:21:14 -05:00
fatih Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
fsnotify/fsnotify [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
gliderlabs/ssh Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
glycerine/go-unsnap-stream Upgrade blevesearch to v0.8.1 (#9177) 2019-11-27 11:23:33 +02:00
go-asn1-ber/asn1-ber [Vendor] Update go-ldap to v3.2.4 (#13163) 2020-10-15 15:27:33 -04:00
go-chi Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
go-enry Update go-enry dependency to v2.6.0 (#13861) 2020-12-05 13:31:18 -05:00
go-git Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
go-ldap/ldap/v3 [Vendor] Update go-ldap to v3.2.4 (#13163) 2020-10-15 15:27:33 -04:00
go-openapi [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
go-redis/redis/v7 Allow common redis and leveldb connections (#12385) 2020-09-28 00:09:46 +03:00
go-sql-driver/mysql Upgrade xorm to v1.0.3 (#12210) 2020-07-11 17:07:52 -04:00
go-stack/stack Use vendored go-swagger (#8087) 2019-09-04 22:53:54 +03:00
go-swagger/go-swagger [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
go-testfixtures/testfixtures/v3 Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
gobwas/glob Implement webhook branch filter (#7791) 2019-09-09 08:48:21 +03:00
gogs Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
golang Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
golang-sql/civil Update to github.com/lafriks/xormstore@v1.3.0 (#8317) 2019-10-02 02:32:12 +02:00
google Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
gorilla Server-side syntax highlighting for all code (#12047) 2020-07-01 00:34:03 +03:00
hashicorp Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
huandu/xstrings Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
imdario/mergo Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
issue9/identicon Update github.com/issue9/identicon from untagged to v1.0.1 (#11359) 2020-05-10 06:23:17 -04:00
jaytaylor/html2text Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
jbenet/go-context Implement git refs API for listing references (branches, tags and other) (#5354) 2018-11-27 16:52:20 -05:00
jessevdk/go-flags Use vendored go-swagger (#8087) 2019-09-04 22:53:54 +03:00
josharian/intern Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
json-iterator/go Add a storage layer for attachments (#11387) 2020-08-18 12:23:45 +08:00
kballard/go-shellquote Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
kevinburke/ssh_config Update src-d/go-git to v4.13.0 (#7688) 2019-07-31 12:45:42 -04:00
keybase/go-crypto update vendor keybase/go-crypto (#10234) 2020-02-11 20:58:23 +02:00
klauspost [Vendor] Update Batch 2020-11 (#13746) 2020-11-29 15:54:08 -05:00
kr [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
lafriks/xormstore Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
lib/pq Switch to absolute latest pq driver (#12859) 2020-09-18 17:38:46 +03:00
libdns/libdns Use caddy's certmagic library for extensible/robust ACME handling (#14177) 2021-01-25 01:37:35 +02:00
lunny/dingtalk_webhook [Vendor] update macaron related (#13409) 2020-11-03 08:04:09 +02:00
magiconair/properties Use vendored go-swagger (#8087) 2019-09-04 22:53:54 +03:00
mailru/easyjson Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
markbates/goth #12897 - add mastodon provider (#13293) 2020-10-25 14:21:49 -04:00
mattn Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
matttproud/golang_protobuf_extensions Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
mgechev update revive lint to latest commit (#12921) 2020-09-22 20:02:16 +03:00
mholt Use caddy's certmagic library for extensible/robust ACME handling (#14177) 2021-01-25 01:37:35 +02:00
microcosm-cc/bluemonday Fix bug of link query order on markdown render (#14156) 2020-12-29 00:28:27 +08:00
miekg/dns Use caddy's certmagic library for extensible/robust ACME handling (#14177) 2021-01-25 01:37:35 +02:00
minio [Vendor] Update Batch 2020-11 (#13746) 2020-11-29 15:54:08 -05:00
mitchellh [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
modern-go Add a storage layer for attachments (#11387) 2020-08-18 12:23:45 +08:00
mrjones/oauth Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
mschoch/smat [Vendor] blevesearch v0.8.1 -> v1.0.7 (#11360) 2020-05-10 06:40:54 +01:00
msteinert/pam Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
nfnt/resize Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) (#12745) 2020-09-06 20:53:33 +01:00
niklasfasching/go-org Update to go-org 1.3.2 (#12728) 2020-09-05 11:45:10 -04:00
nwaples/rardecode Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
NYTimes/gziphandler Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
olekukonko/tablewriter Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
oliamb/cutter Improve handling of non-square avatars (#7025) 2019-05-25 14:46:14 +03:00
olivere/elastic/v7 Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
pelletier/go-toml update revive lint to latest commit (#12921) 2020-09-22 20:02:16 +03:00
philhofer/fwd Update github.com/blevesearch/bleve v1.0.13 -> v1.0.14 (#13947) 2020-12-12 01:16:53 +01:00
pierrec/lz4/v4 Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
pkg/errors Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
pmezard/go-difflib Update code.gitea.io/git (#3137) 2017-12-11 10:23:34 +08:00
pquerna/otp Update github.com/pquerna/otp from untagged to v1.2.0 (#11358) 2020-05-10 15:50:16 +03:00
prometheus Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
PuerkitoBio Upgrade xorm to v1.0.3 (#12210) 2020-07-11 17:07:52 -04:00
quasoft/websspi Add single sign-on support via SSPI on Windows (#8463) 2019-11-23 01:33:31 +02:00
RoaringBitmap/roaring Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
rs/xid Add a storage layer for attachments (#11387) 2020-08-18 12:23:45 +08:00
russross/blackfriday/v2 Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
sergi/go-diff Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
shurcooL Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
spf13 Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
ssor/bom Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
steveyen/gtreap [Vendor] blevesearch v0.8.1 -> v1.0.7 (#11360) 2020-05-10 06:40:54 +01:00
stretchr/testify Upgrade blevesearch dependency to v2.0.1 (#14346) 2021-01-17 20:21:14 -05:00
subosito/gotenv [Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670) 2020-09-01 10:01:23 -04:00
syndtr/goleveldb Use gitea forked macaron (#7933) 2019-08-23 12:40:29 -04:00
tinylib/msgp Update github.com/blevesearch/bleve v1.0.13 -> v1.0.14 (#13947) 2020-12-12 01:16:53 +01:00
toqueteos/webbrowser Exclude generated files from language statistics (#11653) 2020-05-29 09:20:01 +03:00
tstranex/u2f Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
ulikunitz/xz Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
unknwon Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
unrolled/render Fix recovery middleware to render gitea style page. (#13857) 2021-01-05 21:05:40 +08:00
urfave/cli Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
willf/bitset Vendor Update Go Libs (#13166) 2020-10-16 01:06:27 -04:00
xanzy Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00
xi2/xz Dump: add output format tar and output to stdout (#10376) 2020-06-05 16:47:39 -04:00
yohcop/openid-go github.com/yohcop/openid-go update to first tagged version (#11357) 2020-05-10 09:53:04 +01:00
yuin Vendor Update Go Libs (#13444) 2020-11-06 13:41:42 -05:00