Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DatabaseDir directory path where the databases and // attachments should be stored DatabaseDir string `env:"GOYDB_DB_DIR" envDefault:"./dbs"` // PublicDir the public directory that should be served by // the default server implementation PublicDir string `env:"GOYDB_PUBLIC" envDefault:"./public"` // EnablePublicDir allows to enable/disable the public directory serving EnablePublicDir bool `env:"GOYDB_ENABLE_PUBLIC" envDefault:"true"` // ListenAddress contains the default address to listen to. // Not respected if the server is generated by the user. ListenAddress string `env:"GOYDB_LISTEN" envDefault:":7070"` // CookieSecret a secret that is used to verify the // integrity, usually generated using openssl rand -hex 32 CookieSecret string `env:"GOYDB_SECRET" envDefault:"21ccf11d067cec8eebd663af3dc8785521d1cc366f0d533e6740c1cb6840dceb"` // Aministrators list of username:password sperated by "," // for multiple users Aministrators string `env:"GOYDB_ADMINS" envDefault:"admin:secret"` // Containers are zip file based containers that should be mounted before the // database application Containers []public.Container }
func NewConfig ¶
NewConfig will create a new configuration based on the given environment values. Errors while parsing the environment are returned.
func (*Config) BuildDatabase ¶
BuildDatabase builds the storage and http handler based on the given configuration.
Click to show internal directories.
Click to hide internal directories.