Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplateDir stores the name of the directory that contains templates TemplateDir = "templates" // TemplateExt stores the extension used for the template files TemplateExt = ".html" // StaticPrefix stores the URL prefix used when serving static files StaticPrefix = "files" // Timeout stores default http server timeout HttpTimeout = time.Second * 180 // CacheControl stores default cache time for StaticDir CacheControl = time.Hour * 24 )
Variables ¶
View Source
var AppEnvironment = EnvDev
View Source
var DbDsn = ""
DbDsn forces db to connect from env var DB_DSN. Will not be able to connect to other databases
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PagerSize int `comment:"Number of rows in each page when browsing tables"` HistEntries []HistEntry `comment:"History of queries run"` HistEntryMax int `comment:"Maximum number of HistEntries to keep"` ConnectDSN []string `comment:"History of connected database server dsn"` ConnectDSNMax int `comment:"Maximum number of DSN entries to keep"` OpenInWebBrowser bool `comment:"Open server url in web browser on startup"` // contains filtered or unexported fields }
Config stores complete configuration
func (*Config) AddHistEntry ¶
func (*Config) DSNsRecent ¶
func (*Config) GetHistEntries ¶
func (*Config) GetHistEntryRecent ¶
type Environment ¶
type Environment string
var ( EnvTest Environment = "test" EnvDev Environment = "dev" )
Click to show internal directories.
Click to hide internal directories.