(be module.Storage, ctx *cli.Context)
| 195 | } |
| 196 | |
| 197 | func imapAcctList(be module.Storage, ctx *cli.Context) error { |
| 198 | mbe, ok := be.(module.ManageableStorage) |
| 199 | if !ok { |
| 200 | return cli.Exit("Error: storage backend does not support accounts management using maddy command", 2) |
| 201 | } |
| 202 | |
| 203 | list, err := mbe.ListIMAPAccts() |
| 204 | if err != nil { |
| 205 | return err |
| 206 | } |
| 207 | |
| 208 | if len(list) == 0 && !ctx.Bool("quiet") { |
| 209 | fmt.Fprintln(os.Stderr, "No users.") |
| 210 | } |
| 211 | |
| 212 | for _, user := range list { |
| 213 | fmt.Println(user) |
| 214 | } |
| 215 | return nil |
| 216 | } |
| 217 | |
| 218 | func imapAcctCreate(be module.Storage, ctx *cli.Context) error { |
| 219 | mbe, ok := be.(module.ManageableStorage) |
no test coverage detected