Last active
February 17, 2021 07:09
-
-
Save ivancorrales/2e5e9f66b6c2209f2efafe7132eecd69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func dropCollection { | |
input { | |
arg mongoUri { | |
description = "mongo uri" | |
} | |
arg database { | |
description = "Name of the database" | |
default = "admin" | |
} | |
arg collection { | |
description = "Name of the collection" | |
default = "users" | |
} | |
arg credentials { | |
description = "A object with two attributes: username & password" | |
} | |
} | |
body { | |
mongo drop { | |
connection { | |
uri = mongoUri | |
auth scram-sha-1{ | |
username = credentials.username | |
password = credentials.password | |
} | |
} | |
query { | |
database = database | |
collection = collection | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment