feat(11.1-04): add the Database section and the core Services pages

- docs/database: models, migrations, queries and pagination, relations,
  casts and validation, attachments and transactions (lagoon.Transaction,
  lagoon.AfterCommit, nested savepoints, lagoon.OnDatabase)
- docs/services: configuration, events, routing with auth groups, rate
  limiting, authentication, the OAuth server, mail and localization
- runnable Examples for lagoon, attach, compass, surf, wire, bouncer,
  wristband, postcard, phrasebook and festival; lagoon TestDocs* regions
  run on the package's Postgres harness through DocsDB
- 15 new required pages
This commit is contained in:
Jakub Zych
2026-09-30 22:59:25 +02:00
parent 9d37d56486
commit efb35a2d35
28 changed files with 3138 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package lagoon
import (
"testing"
"gorm.io/gorm"
)
// DocsDB returns a GORM handle on a fresh ICU pl-PL database named name in
// this package's Postgres harness, for the database-backed docs examples in
// example_test.go. It skips under -short and fails when the harness has no
// database, like the package's other database tests.
func DocsDB(t *testing.T, name string) *gorm.DB {
t.Helper()
db, _ := dedicatedDB(t, name)
gdb, err := Use(t.Context(), db)
if err != nil {
t.Fatal(err)
}
return gdb
}