Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/autocomplete/databases_ng_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func DatabasesNgListAutoComplete(ctx context.Context) error {
databases, err := client.Preview().DatabasesList(ctx)
if err == nil {
for _, db := range databases {
fmt.Println(db.App.ID)
fmt.Println(db.ID)
}
}

Expand Down
8 changes: 4 additions & 4 deletions dbng/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func Create(ctx context.Context, params scalingo.DatabaseCreateParams, wait bool
return errors.Wrap(ctx, err, "create database")
}
io.Statusf("Your %s database %s ('%s') is being provisioned…\n\n",
db.Addon.AddonProvider.Name,
db.App.ID,
db.App.Name,
db.Technology,
db.ID,
db.Name,
)

if wait {
Expand All @@ -46,7 +46,7 @@ func Create(ctx context.Context, params scalingo.DatabaseCreateParams, wait bool
spinner.Start()
defer spinner.Stop()

err = waitForRunningDatabase(ctx, c, db.App.ID)
err = waitForRunningDatabase(ctx, c, db.ID)
if err != nil {
return errors.Wrap(ctx, err, "wait for running database")
}
Expand Down
6 changes: 3 additions & 3 deletions dbng/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func Destroy(ctx context.Context, appID string) error {
return errors.Wrap(ctx, err, "delete database")
}

io.Warningf("You're going to delete database %s ('%s'),\n", db.App.ID, db.App.Name)
io.Warningf("You're going to delete database %s ('%s'),\n", db.ID, db.Name)
io.Warning()
io.Warning("This operation is irreversible, all data including backups of your database will be deleted.")

Expand All @@ -32,7 +32,7 @@ func Destroy(ctx context.Context, appID string) error {
}
fmt.Println()

if validationID != db.App.ID && validationID != db.App.Name {
if validationID != db.ID && validationID != db.Name {
return errors.Newf(ctx, "'%s' is not the ID or the name of the database, aborting…\n", validationID)
}

Expand All @@ -41,7 +41,7 @@ func Destroy(ctx context.Context, appID string) error {
return errors.Wrap(ctx, err, "delete database")
}

io.Statusf("The database %s has been deleted.", db.App.ID)
io.Statusf("The database %s has been deleted.", db.ID)

return nil
}
8 changes: 4 additions & 4 deletions dbng/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ func Info(ctx context.Context, appID string) error {
}

data := [][]string{
{"ID", db.App.ID},
{"Name", db.App.Name},
{"Type", db.Addon.AddonProvider.Name},
{"Plan", db.Addon.Plan.Name},
{"ID", db.ID},
{"Name", db.Name},
{"Type", db.Technology},
Comment thread
baptmaury marked this conversation as resolved.
{"Plan", db.Plan},
{"Status", string(db.Database.Status)},
{"Version", db.Database.ReadableVersion},
{"Force TLS ", forceSSL},
Expand Down
10 changes: 5 additions & 5 deletions dbng/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ func List(ctx context.Context) error {
role := utils.AppRole(currentUser, &db.App)

_ = t.Append([]string{
db.App.ID,
db.App.Name,
db.Addon.AddonProvider.Name,
db.Addon.Plan.Name,
db.ID,
db.Name,
db.Technology,
db.Plan,
string(role),
string(db.Addon.Status),
string(db.Database.Status),
db.App.Project.Name,
})
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.0

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Scalingo/go-scalingo/v8 v8.8.0
github.com/Scalingo/go-scalingo/v8 v8.9.0
github.com/Scalingo/go-utils/errors/v2 v2.5.1
github.com/Scalingo/go-utils/logger v1.11.0
github.com/Scalingo/gopassword v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw=
github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE=
github.com/Scalingo/go-scalingo/v8 v8.8.0 h1:OY14XbEEdZabwImRgXGL0txjesdhW8fX5/GrlAsxlBg=
github.com/Scalingo/go-scalingo/v8 v8.8.0/go.mod h1:C87ufsz8H4/tUutK6cAmUaLpM4HwV8QOGAyfZyRgFAA=
github.com/Scalingo/go-scalingo/v8 v8.9.0 h1:r1yJxPenMjrvsG2C7K+aycDxjT06gbDNkZ8i6PIw9mM=
github.com/Scalingo/go-scalingo/v8 v8.9.0/go.mod h1:C87ufsz8H4/tUutK6cAmUaLpM4HwV8QOGAyfZyRgFAA=
github.com/Scalingo/go-utils/errors/v2 v2.5.1 h1:1tfJW6/ZxTgrRmFTlKQCOtArQquOW0/XdZQzx8wMHoM=
github.com/Scalingo/go-utils/errors/v2 v2.5.1/go.mod h1:SbR1JuMtfAl+gpM7ahUW/c3Jm5MMzMAwJBk1pEHkVd8=
github.com/Scalingo/go-utils/logger v1.11.0 h1:QUsGgZIv6LWUCyKKy06DuW67FLmzSmWPmnhD/3YlxeM=
Expand Down
2 changes: 1 addition & 1 deletion utils/consent.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func CheckForConsent(ctx context.Context, resourceName string, consentTypes ...C
}

for _, db := range dbs {
if db.App.Name == resourceName || db.App.ID == resourceName {
if db.Name == resourceName || db.ID == resourceName {
// The operator is a collaborator, no consent needed
return
}
Expand Down
11 changes: 10 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v8/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v8/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/Scalingo/go-scalingo/v8/addons_providers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 64 additions & 21 deletions vendor/github.com/Scalingo/go-scalingo/v8/databases_preview.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/Scalingo/go-scalingo/v8/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ github.com/ProtonMail/go-crypto/openpgp/packet
github.com/ProtonMail/go-crypto/openpgp/s2k
github.com/ProtonMail/go-crypto/openpgp/x25519
github.com/ProtonMail/go-crypto/openpgp/x448
# github.com/Scalingo/go-scalingo/v8 v8.8.0
# github.com/Scalingo/go-scalingo/v8 v8.9.0
## explicit; go 1.24.0
github.com/Scalingo/go-scalingo/v8
github.com/Scalingo/go-scalingo/v8/billing
Expand Down