Documentation ¶
Overview ¶
Package app provides the app's configuration. The first configuration file is app.json found adjacent to the executable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BackupPath string // BackupPath is the directory where the data is backed up. DBBasePath string // DBBasePath is the directory where the database files are stored. ImagesDir string // ImagesDir is the directory where user images are stored. LogsDir string // LogsDir is the directory where the logs are stored. ThumbnailsDir string // ThumbnailsDir is the directory where the thumbnails of user images are stored. VideosDir string // VideosDir is the directory where user videos are stored. ImageExt = ".webp" // ImageExt is the file extension for images. VideoExt = ".webm" // VideoExt is the file extension for videos. Info = GeneralInfo{ Version: semver.Version{ Major: 1, Minor: 3, Patch: 0, }, } // Info stores general application information. FdcDB = "fdc.db" // FdcDB is the name of the FDC database. RecipyaDB = "recipya.db" // RecipyaDB is the name of Recipya's main database. ErrNoUpdate = errors.New("already latest version") // ErrNoUpdate is the error for when the application is up-to-date. )
Functions ¶
Types ¶
type AzureDI ¶ added in v1.2.0
AzureDI holds configuration data for the Azure AI Document Intelligence integration.
type ConfigEmail ¶
ConfigEmail holds email configuration variables.
type ConfigFile ¶
type ConfigFile struct { Email ConfigEmail `json:"email"` Integrations ConfigIntegrations `json:"integrations"` Server ConfigServer `json:"server"` }
ConfigFile holds the contents of config.json.
var Config ConfigFile
Config references a global ConfigFile.
func (*ConfigFile) Address ¶
func (c *ConfigFile) Address() string
Address assembles the server's web address from its URL and host.
func (*ConfigFile) IsCookieSecure ¶ added in v1.0.1
func (c *ConfigFile) IsCookieSecure() bool
IsCookieSecure returns whether the cookie should secure.
func (*ConfigFile) Update ¶ added in v1.2.0
func (c *ConfigFile) Update(updated ConfigFile) error
Update updates the application's configuration.
type ConfigIntegrations ¶
type ConfigIntegrations struct {
AzureDI AzureDI `json:"azureDocumentIntelligence"`
}
ConfigIntegrations holds configuration data for 3rd-party services.
Click to show internal directories.
Click to hide internal directories.