Added env access to replaycli

nats
Paulo Simão 2021-10-10 05:41:47 -03:00
parent c4e964e115
commit 55bef831c2
1 changed files with 37 additions and 0 deletions

View File

@ -17,6 +17,43 @@ func (c *Cli) HttpCli() *api.Cli {
return c.cli
}
func (c *Cli) ReplayEnvQueueId() string {
return os.Getenv("REPLAY_QUEUEID")
}
func (c *Cli) ReplayEnvAlias() string {
return os.Getenv("REPLAY_ALIAS")
}
func (c *Cli) ReplayEnvFeatureDir() string {
return os.Getenv("REPLAY_FEATUREDIR")
}
func (c *Cli) ReplayEnvRoot() string {
return os.Getenv("REPLAY_ROOT")
}
func (c *Cli) ReplayEnvAddr() string {
return os.Getenv("REPLAY_ADDR")
}
func (c *Cli) ReplayEnvHomeDir() string {
return os.Getenv("REPLAY_HOMEDIR")
}
func (c *Cli) ReplayEnvRepo() string {
return os.Getenv("REPLAY_REPO")
}
func (c *Cli) ReplayEnvVer() string {
return os.Getenv("REPLAY_VER")
}
func (c *Cli) ReplayEnvRepoDir() string {
return os.Getenv("REPLAY_REPODIR")
}
func (c *Cli) ReplayEnvDataDir() string {
return os.Getenv("REPLAY_DATADIR")
}
func (c *Cli) ReplayEnvInstanceAlias() string {
return os.Getenv("REPLAY_INSTANCE_ALIAS")
}
func (c *Cli) ReplayEnvApiKey() string {
return os.Getenv("REPLAY_APIKEY")
}
func (c *Cli) OpenApp(id uint) error {
err := c.cli.HttpJsonGet(fmt.Sprintf("/api/v1/app/run/%d", id), nil)
return err