cleaned up old config properties and added an external resource directory and a user agreement resource name
This commit is contained in:
+10
-12
@@ -59,16 +59,13 @@ func (*AmCLI) Version() string {
|
||||
// AmConfig holds the configuration of the application as read from YAML.
|
||||
type AmConfig struct {
|
||||
Site struct {
|
||||
BaseURL string `yaml:"baseURL"`
|
||||
Title string `yaml:"title"`
|
||||
TopRefresh int `yaml:"topRefresh"`
|
||||
LoginCookieName string `yaml:"loginCookieName"`
|
||||
LoginCookieAge int `yaml:"loginCookieAge"`
|
||||
SessionExpire string `yaml:"sessionExpire"`
|
||||
UserAgreement struct {
|
||||
Title string `yaml:"title"`
|
||||
Text string `yaml:"text"`
|
||||
} `yaml:"userAgreement"`
|
||||
BaseURL string `yaml:"baseURL"`
|
||||
Title string `yaml:"title"`
|
||||
TopRefresh int `yaml:"topRefresh"`
|
||||
LoginCookieName string `yaml:"loginCookieName"`
|
||||
LoginCookieAge int `yaml:"loginCookieAge"`
|
||||
SessionExpire string `yaml:"sessionExpire"`
|
||||
UserAgreementResource string `yaml:"userAgreementResource"`
|
||||
} `yaml:"site"`
|
||||
Database struct {
|
||||
Driver string `yaml:"driver"`
|
||||
@@ -98,8 +95,9 @@ type AmConfig struct {
|
||||
VeniceCompatibleImageURLs bool `yaml:"veniceCompatibleImageURLs"`
|
||||
} `yaml:"rendering"`
|
||||
Resources struct {
|
||||
ViewTemplateDir string `yaml:"viewTemplateDir"`
|
||||
ExternalContentPath string `yaml:"externalContentPath"`
|
||||
ViewTemplateDir string `yaml:"viewTemplateDir"`
|
||||
ExternalContentPath string `yaml:"externalContentPath"`
|
||||
ExternalResourcePath string `yaml:"externalResourcePath"`
|
||||
} `yaml:"resources"`
|
||||
Posting struct {
|
||||
ExternalDictionary string `yaml:"externalDictionary"`
|
||||
|
||||
+2
-4
@@ -13,10 +13,7 @@ site:
|
||||
loginCookieName: AmsterdamAuth
|
||||
loginCookieAge: 365
|
||||
sessionExpire: "3h"
|
||||
userAgreement:
|
||||
title: "Amsterdam User Agreement"
|
||||
text: >
|
||||
Text of this agreement is TBD.
|
||||
userAgreementResource: "useragreement.html"
|
||||
database:
|
||||
driver: "mysql"
|
||||
dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=UTC"
|
||||
@@ -46,6 +43,7 @@ rendering:
|
||||
resources:
|
||||
viewTemplateDir: ""
|
||||
externalContentPath: ""
|
||||
externalResourcePath: ""
|
||||
posting:
|
||||
externalDictionary: ""
|
||||
uploads:
|
||||
|
||||
Reference in New Issue
Block a user