MCPcopy Create free account
hub / github.com/Scalingo/cli / DisableFeature

Function DisableFeature

db/features.go:83–103  ·  view source on GitHub ↗

DisableFeature is the command handler to disable a database feature on a database addon like 'force-ssl' or 'public-availability'

(ctx context.Context, app, addon, feature string)

Source from the content-addressed store, hash-verified

81// DisableFeature is the command handler to disable a database feature on a
82// database addon like 'force-ssl' or 'public-availability'
83func DisableFeature(ctx context.Context, app, addon, feature string) error {
84 spinner := spinner.New(spinner.CharSets[11], 100*time.Millisecond)
85 spinner.Suffix = " Disabling database feature"
86 spinner.Start()
87 defer spinner.Stop()
88
89 client, err := config.ScalingoClient(ctx)
90 if err != nil {
91 return errors.Wrapf(ctx, err, "fail to get Scalingo client")
92 }
93
94 _, err = client.DatabaseDisableFeature(ctx, app, addon, feature)
95 if err != nil {
96 return errors.Wrapf(ctx, err, "fail to disable feature '%v'", feature)
97 }
98 spinner.Stop()
99
100 io.Statusf("Feature %v has been disabled.\n", feature)
101
102 return nil
103}

Callers 1

databases.goFile · 0.92

Calls 4

ScalingoClientFunction · 0.92
StatusfFunction · 0.92
StartMethod · 0.80
StopMethod · 0.80

Tested by

no test coverage detected