saastool增加docker/daemon模式
This commit is contained in:
@@ -17,6 +17,8 @@ const (
|
||||
bindSetPath = "/saas/bind/set"
|
||||
bindDeletePath = "/saas/bind/delete"
|
||||
scriptRunPath = "/saas/script/run"
|
||||
expListPath = "/saas/exp/list"
|
||||
expGetPath = "/saas/exp/get"
|
||||
)
|
||||
|
||||
type ApiUrls struct {
|
||||
@@ -36,6 +38,8 @@ type ApiUrls struct {
|
||||
BindSetPath string
|
||||
BindDeletePath string
|
||||
ScriptRunPath string
|
||||
ExpListPath string
|
||||
ExpGetPath string
|
||||
}
|
||||
|
||||
func InitAPIUrl(c *ApiUrls) *ApiUrls {
|
||||
@@ -136,6 +140,18 @@ func InitAPIUrl(c *ApiUrls) *ApiUrls {
|
||||
r.ScriptRunPath = scriptRunPath
|
||||
}
|
||||
|
||||
if c.ExpListPath != "" {
|
||||
r.ExpListPath = c.ExpListPath
|
||||
} else {
|
||||
r.ExpListPath = expListPath
|
||||
}
|
||||
|
||||
if c.ExpGetPath != "" {
|
||||
r.ExpGetPath = c.ExpGetPath
|
||||
} else {
|
||||
r.ExpGetPath = expGetPath
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user