Documentation
¶
Overview ¶
Package app wires the stores, services and API handlers into one Echo server, and serves the web client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App is a wired server.
func Build ¶
Build wires everything without connecting to anything, so tests can pass fakes. Background work starts in Start.
type Config ¶
type Config struct {
Address string
DomainName string
DatabaseURL string
DatabaseHost string
Version string
Session auth.Config
S3 storage.Config
Mail mail.Config
Passwords auth.PasswordConfig
Redis auth.RedisConfig
// UI is the built React client (index.html + assets/); nil means not built.
UI fs.FS
// UIProxy, when set, proxies every non-API page to the Vite dev server instead of UI.
UIProxy *url.URL
// MTLS, when set, serves over TLS and only accepts requests from allowed client certificates.
MTLS *mtls.Server
// TrustedProxies are the reverse proxies whose X-Forwarded-For is
// believed. Empty means the connecting address is the client's.
TrustedProxies []*net.IPNet
// FileRetention is how long a file may go unreferenced before the daily
// file check deletes it; zero means filecheck.MaxRetention (30 days).
FileRetention time.Duration
}
Config is everything the server needs, loaded from the environment by main.
type Stores ¶
type Stores struct {
Affiliation *affiliation.Store
Document *document.Store
FileCheck *filecheck.Store
Image *image.Store
News *news.Store
Player *player.Store
Programme *programme.Store
Setting *setting.Store
Sponsor *sponsor.Store
Team *team.Store
User *user.Store
WhatsOn *whatson.Store
}
Stores are the database repositories.
Click to show internal directories.
Click to hide internal directories.