You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services
wxiaoguang 6b33152b7d
Decouple the different contexts from each other (#24786)
Replace #16455

Close #21803

Mixing different Gitea contexts together causes some problems:

1. Unable to respond proper content when error occurs, eg: Web should
respond HTML while API should respond JSON
2. Unclear dependency, eg: it's unclear when Context is used in
APIContext, which fields should be initialized, which methods are
necessary.


To make things clear, this PR introduces a Base context, it only
provides basic Req/Resp/Data features.

This PR mainly moves code. There are still many legacy problems and
TODOs in code, leave unrelated changes to future PRs.
1 year ago
..
actions Rewrite queue (#24505) 1 year ago
agit add user rename endpoint to admin api (#22789) 1 year ago
asymkey Add context cache as a request level cache (#22294) 1 year ago
attachment Preserve file size when creating attachments (#23406) 1 year ago
auth Decouple the different contexts from each other (#24786) 1 year ago
automerge Rewrite queue (#24505) 1 year ago
context Decouple the different contexts from each other (#24786) 1 year ago
convert Refactor Pull Mirror and fix out-of-sync bugs (#24732) 1 year ago
cron Add Cargo package registry (#21888) 1 year ago
externalaccount Implement FSFE REUSE for golang files (#21840) 2 years ago
forms Decouple the different contexts from each other (#24786) 1 year ago
gitdiff Simplify template helper functions (#24570) 1 year ago
issue Improve Gitea's web context, decouple "issue template" code into service package (#24590) 1 year ago
lfs Fix auth check bug (#24382) 1 year ago
mailer Rewrite queue (#24505) 1 year ago
markup Decouple the different contexts from each other (#24786) 1 year ago
migrations Some refactors for issues stats (#24793) 1 year ago
mirror Rewrite queue (#24505) 1 year ago
org Implement FSFE REUSE for golang files (#21840) 2 years ago
packages Add Go package registry (#24687) 1 year ago
pull Support for status check pattern (#24633) 1 year ago
release Delete deleted release attachments immediately from storage (#23913) 1 year ago
repository Add status indicator on main home screen for each repo (#24638) 1 year ago
task Make repo migration cancelable and fix various bugs (#24605) 1 year ago
user Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 1 year ago
webhook Rewrite queue (#24505) 1 year ago
wiki Improve wiki user title test (#24559) 1 year ago