feat: make credential changes replayable
This commit is contained in:
@@ -22,9 +22,19 @@ func main() {
|
||||
}
|
||||
}
|
||||
func run() error {
|
||||
if len(os.Args) < 2 || os.Args[1] != "bootstrap" {
|
||||
return errors.New("usage: orbit-admin bootstrap (--application NAME | --application-id ID) --namespace NAME --environment NAME --queue NAME --output NEW_FILE")
|
||||
if len(os.Args) < 2 {
|
||||
return errors.New("usage: orbit-admin bootstrap|credential status|rotate|revoke|apply")
|
||||
}
|
||||
switch os.Args[1] {
|
||||
case "bootstrap":
|
||||
return runBootstrap(os.Args[2:])
|
||||
case "credential":
|
||||
return runCredential(os.Args[2:])
|
||||
}
|
||||
return errors.New("usage: orbit-admin bootstrap|credential status|rotate|revoke|apply")
|
||||
}
|
||||
|
||||
func runBootstrap(args []string) error {
|
||||
flags := flag.NewFlagSet("bootstrap", flag.ContinueOnError)
|
||||
var in mysql.BootstrapInput
|
||||
var output string
|
||||
@@ -48,7 +58,7 @@ func run() error {
|
||||
flags.BoolVar(&in.WorkflowSignalAccess, "workflow-signal-access", false, "explicitly grant workflow signal and read actions")
|
||||
flags.BoolVar(&in.WorkflowRecoveryAccess, "workflow-recovery-access", false, "explicitly grant workflow recovery and read actions")
|
||||
flags.BoolVar(&in.WorkflowAuditAccess, "workflow-audit-access", false, "explicitly grant workflow operation audit read action")
|
||||
if err := flags.Parse(os.Args[2:]); err != nil {
|
||||
if err := flags.Parse(args); err != nil {
|
||||
return err
|
||||
}
|
||||
if flags.NArg() != 0 || output == "" {
|
||||
|
||||
Reference in New Issue
Block a user