@@ -145,6 +145,7 @@ var commands = []struct {
145
145
{"config dnsrecords" , cmdConfigDNSRecords },
146
146
{"config describe-domains" , cmdConfigDescribeDomains },
147
147
{"config describe-static" , cmdConfigDescribeStatic },
148
+ {"config account list" , cmdConfigAccountList },
148
149
{"config account add" , cmdConfigAccountAdd },
149
150
{"config account rm" , cmdConfigAccountRemove },
150
151
{"config account disable" , cmdConfigAccountDisable },
@@ -996,6 +997,27 @@ func ctlcmdConfigAccountRemove(ctl *ctl, account string) {
996
997
fmt .Println ("account removed" )
997
998
}
998
999
1000
+ func cmdConfigAccountList (c * cmd ) {
1001
+ c .help = `List all accounts.
1002
+
1003
+ Each account is printed on a line, with optional additional tab-separated
1004
+ information, such as "(disabled)".
1005
+ `
1006
+ args := c .Parse ()
1007
+ if len (args ) != 0 {
1008
+ c .Usage ()
1009
+ }
1010
+
1011
+ mustLoadConfig ()
1012
+ ctlcmdConfigAccountList (xctl ())
1013
+ }
1014
+
1015
+ func ctlcmdConfigAccountList (ctl * ctl ) {
1016
+ ctl .xwrite ("accountlist" )
1017
+ ctl .xreadok ()
1018
+ ctl .xstreamto (os .Stdout )
1019
+ }
1020
+
999
1021
func cmdConfigAccountDisable (c * cmd ) {
1000
1022
c .params = "account message"
1001
1023
c .help = `Disable login for an account, showing message to users when they try to login.
0 commit comments