本文整理匯總了Golang中github.com/remind101/empire/pkg/heroku.Client類的典型用法代碼示例。如果您正苦於以下問題:Golang Client類的具體用法?Golang Client怎麽用?Golang Client使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Client類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: mustAppList
// Lists apps or fails.
func mustAppList(t testing.TB, c *heroku.Client) []heroku.App {
apps, err := c.AppList(nil)
if err != nil {
t.Fatal(err)
}
return apps
}
示例2: mustFormationBatchUpdate
func mustFormationBatchUpdate(t testing.TB, c *heroku.Client, appName string, updates []heroku.FormationBatchUpdateOpts) []heroku.Formation {
f, err := c.FormationBatchUpdate(appName, updates, "")
if err != nil {
t.Fatal(err)
}
return f
}
示例3: mustReleaseRollback
func mustReleaseRollback(t testing.TB, c *heroku.Client, appName string, version string) *heroku.Release {
release, err := c.ReleaseRollback(appName, version, "")
if err != nil {
t.Fatal(err)
}
return release
}
示例4: mustReleaseList
func mustReleaseList(t testing.TB, c *heroku.Client, appName string) []heroku.Release {
releases, err := c.ReleaseList(appName, nil)
if err != nil {
t.Fatal(err)
}
return releases
}
示例5: mustConfigVarInfo
func mustConfigVarInfo(t testing.TB, c *heroku.Client, appName string) map[string]string {
vars, err := c.ConfigVarInfo(appName)
if err != nil {
t.Fatal(err)
}
return vars
}
示例6: mustConfigVarUpdate
func mustConfigVarUpdate(t testing.TB, c *heroku.Client, appName string, options map[string]*string) map[string]string {
vars, err := c.ConfigVarUpdate(appName, options, "")
if err != nil {
t.Fatal(err)
}
return vars
}
示例7: mustDeploy
func mustDeploy(t testing.TB, c *heroku.Client, image string) {
var (
f DeployForm
)
f.Image = image
if err := c.Post(ioutil.Discard, "/deploys", &f); err != nil {
t.Fatal(err)
}
}
示例8: mustAppDeploy
// Deploys an image for the app or fails.
func mustAppDeploy(t testing.TB, c *heroku.Client, appName string, image string) {
var (
f DeployForm
)
f.Image = image
endpoint := fmt.Sprintf("/apps/%s/deploys", appName)
if err := c.Post(ioutil.Discard, endpoint, &f); err != nil {
t.Fatal(err)
}
}
示例9: mustOrganizationAppCreate
// Creates an app or fails.
func mustOrganizationAppCreate(t testing.TB, c *heroku.Client, app empire.App) *heroku.OrganizationApp {
name := string(app.Name)
opts := heroku.OrganizationAppCreateOpts{
Name: &name,
}
a, err := c.OrganizationAppCreate(&opts)
if err != nil {
t.Fatal(err)
}
return a
}
示例10: mustAppDelete
// Delets an app or fails.
func mustAppDelete(t testing.TB, c *heroku.Client, appName string) {
if err := c.AppDelete(appName); err != nil {
t.Fatal(err)
}
}