Mock API
This commit is contained in:
parent
be8ff3466a
commit
a9be05854c
11 changed files with 331 additions and 12 deletions
|
@ -10,6 +10,10 @@ func (c *Config) declareFlags() {
|
|||
flag.StringVar(&c.BaseURL, "baseurl", c.BaseURL, "URL prepended to each URL")
|
||||
flag.StringVar(&c.Bind, "bind", c.Bind, "Bind port/socket")
|
||||
flag.StringVar(&c.DevProxy, "dev", c.DevProxy, "Use ui directory instead of embedded assets")
|
||||
flag.StringVar(&c.TracksDir, "tracks-dir", c.TracksDir, "Path to the directory containing the tracks")
|
||||
flag.StringVar(&c.GongsDir, "gongs-dir", c.GongsDir, "Path to the directory containing the gongs")
|
||||
flag.StringVar(&c.ActionsDir, "actions-dir", c.ActionsDir, "Path to the directory containing the actions")
|
||||
flag.StringVar(&c.RoutinesDir, "routines-dir", c.RoutinesDir, "Path to the directory containing the routines")
|
||||
|
||||
// Others flags are declared in some other files when they need specials configurations
|
||||
}
|
||||
|
@ -17,7 +21,11 @@ func (c *Config) declareFlags() {
|
|||
func Consolidated() (cfg *Config, err error) {
|
||||
// Define defaults options
|
||||
cfg = &Config{
|
||||
Bind: "127.0.0.1:8080",
|
||||
Bind: "127.0.0.1:8080",
|
||||
TracksDir: "./tracks/",
|
||||
GongsDir: "./gongs/",
|
||||
ActionsDir: "./actions/",
|
||||
RoutinesDir: "./routines/",
|
||||
}
|
||||
|
||||
cfg.declareFlags()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue