Rename Go client package from mciasgoclient to mcias
- Update package declaration in client.go - Update error message strings to reference new package name - Update test package and imports to use new name - Update README.md documentation and examples with new package name - All tests pass
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
// token issue -id UUID
|
||||
// token revoke -jti JTI
|
||||
//
|
||||
// pgcreds list
|
||||
// pgcreds set -id UUID -host HOST [-port PORT] -db DB -user USER [-password PASS]
|
||||
// pgcreds get -id UUID
|
||||
//
|
||||
@@ -526,9 +527,11 @@ func (c *controller) tokenRevoke(args []string) {
|
||||
|
||||
func (c *controller) runPGCreds(args []string) {
|
||||
if len(args) == 0 {
|
||||
fatalf("pgcreds requires a subcommand: get, set")
|
||||
fatalf("pgcreds requires a subcommand: list, get, set")
|
||||
}
|
||||
switch args[0] {
|
||||
case "list":
|
||||
c.pgCredsList(args[1:])
|
||||
case "get":
|
||||
c.pgCredsGet(args[1:])
|
||||
case "set":
|
||||
@@ -538,6 +541,15 @@ func (c *controller) runPGCreds(args []string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *controller) pgCredsList(args []string) {
|
||||
fs := flag.NewFlagSet("pgcreds list", flag.ExitOnError)
|
||||
_ = fs.Parse(args)
|
||||
|
||||
var result json.RawMessage
|
||||
c.doRequest("GET", "/v1/pgcreds", nil, &result)
|
||||
printJSON(result)
|
||||
}
|
||||
|
||||
func (c *controller) pgCredsGet(args []string) {
|
||||
fs := flag.NewFlagSet("pgcreds get", flag.ExitOnError)
|
||||
id := fs.String("id", "", "account UUID (required)")
|
||||
@@ -943,6 +955,7 @@ Commands:
|
||||
token issue -id UUID
|
||||
token revoke -jti JTI
|
||||
|
||||
pgcreds list
|
||||
pgcreds get -id UUID
|
||||
pgcreds set -id UUID -host HOST [-port PORT] -db DB -user USER [-password PASS]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user