-
Notifications
You must be signed in to change notification settings - Fork 87
CLOUDP-58790: Take database name from a flag when handling dbusers, Atlas #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5613917
f67db79
227aa73
8e179e3
e7cfa4b
003b56e
0763251
3242820
ef618af
d28702c
4a1580b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,9 @@ type deleteOpts struct { | |
// DeleterFromProject a function to delete from the store. | ||
type DeleterFromProject func(projectID string, entry string) error | ||
|
||
// DeleterFromProjectAuthDB a function to delete from the store. | ||
type DeleterFromProjectAuthDB func(authDB string, projectID string, entry string) error | ||
|
||
// DeleteFromProject deletes a resource from a project, it expects a callback | ||
// that should perform the deletion from the store. | ||
func (opts *deleteOpts) DeleteFromProject(d DeleterFromProject, projectID string) error { | ||
|
@@ -83,6 +86,24 @@ func (opts *deleteOpts) DeleteFromProject(d DeleterFromProject, projectID string | |
return nil | ||
} | ||
|
||
// DeleterFromProjectAuthDB deletes a resource from a project, it expects a callback | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not why after this change every time I run a test regarding any delete I get There is this extra string (EXTRA string=test), and I do not know where it came from. I also tried to revert all of my changes but I still get the same result 🤕 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed the issue by adding the successMessage to the test. The problem was caused by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we improve on the |
||
// that should perform the deletion from the store. | ||
func (opts *deleteOpts) DeleterFromProjectAuthDB(d DeleterFromProjectAuthDB, authDB, projectID string) error { | ||
if !opts.confirm { | ||
fmt.Println(opts.failMessage) | ||
return nil | ||
} | ||
err := d(authDB, projectID, opts.entry) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
fmt.Printf(opts.successMessage, opts.entry) | ||
|
||
return nil | ||
} | ||
|
||
// Deleter a function to delete from the store. | ||
type Deleter func(entry string) error | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about why we are doing all of this before calling the delete function in the store