diff options
author | singuliere <35190819+singuliere@users.noreply.github.com> | 2021-11-30 12:56:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 11:56:12 +0000 |
commit | 64b7d0de8e0ef17cef16ed65700913c905a94f37 (patch) | |
tree | 222b0640a19a586da108bfb8ea448fed1af23bdf /docs | |
parent | 9ecfc54a8f09239d159db2636f3822042cd7fef8 (diff) | |
download | gitea-64b7d0de8e0ef17cef16ed65700913c905a94f37.tar.gz gitea-64b7d0de8e0ef17cef16ed65700913c905a94f37.zip |
docs: modules do not rely on models, services do (#17861)
services: provide some services for users, usually use
database (models) modules: provide some basic functions without
database, eg: code parser, etc The major difference is services use
database, while modules don’t.
Signed-off-by: singuliere <singuliere@autistici.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/developers/guidelines-backend.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/content/doc/developers/guidelines-backend.md b/docs/content/doc/developers/guidelines-backend.md index 69bdc6d2a6..cca17150b7 100644 --- a/docs/content/doc/developers/guidelines-backend.md +++ b/docs/content/doc/developers/guidelines-backend.md @@ -38,7 +38,7 @@ To maintain understandable code and avoid circular dependencies it is important - `models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`. - `models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests. - `models/migrations`: Stores database migrations between versions. PRs that change a database structure **MUST** also have a migration step. -- `modules`: Different modules to handle specific functionality in Gitea. Work in Progress: Some of them should be moved to `services`. +- `modules`: Different modules to handle specific functionality in Gitea. Work in Progress: Some of them should be moved to `services`, in particular those that depend on models because they rely on the database. - `modules/setting`: Store all system configurations read from ini files and has been referenced by everywhere. But they should be used as function parameters when possible. - `modules/git`: Package to interactive with `Git` command line or Gogit package. - `public`: Compiled frontend files (javascript, images, css, etc.) |