added global config
parent
d12b549846
commit
a6a48c459b
|
@ -73,13 +73,15 @@ func (c *Cli) ConfigGet(k string) (ret string, err error) {
|
||||||
err = c.HttpCli().JsonGet("/api/v1/config/byrepo/"+util.Repo()+"/"+k, &ret)
|
err = c.HttpCli().JsonGet("/api/v1/config/byrepo/"+util.Repo()+"/"+k, &ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (c *Cli) ConfigGetGlobal(k string) (ret string, err error) {
|
||||||
|
err = c.HttpCli().JsonGet("/api/v1/config/global/"+k, &ret)
|
||||||
|
return
|
||||||
|
}
|
||||||
func (c *Cli) ConfigGetAll() (ret []types.Config, err error) {
|
func (c *Cli) ConfigGetAll() (ret []types.Config, err error) {
|
||||||
ret = make([]types.Config, 0)
|
ret = make([]types.Config, 0)
|
||||||
err = c.HttpCli().JsonGet("/api/v1/config/byrepo/"+util.Repo(), &ret)
|
err = c.HttpCli().JsonGet("/api/v1/config/byrepo/"+util.Repo(), &ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) ConfigGetMap() (ret map[string]types.Config, err error) {
|
func (c *Cli) ConfigGetMap() (ret map[string]types.Config, err error) {
|
||||||
cfgs, err := c.ConfigGetAll()
|
cfgs, err := c.ConfigGetAll()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue