Add command stubs for all commands

Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
kolaente 2020-08-13 12:25:22 +02:00
parent 99b0d311dd
commit efa052f8ad
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 57 additions and 2 deletions

View File

@ -29,7 +29,7 @@ import (
)
func init() {
userCmd.AddCommand(userListCmd)
userCmd.AddCommand(userListCmd, userCreateCmd, userDeleteCmd, userUpdateCmd, userResetPasswordCmd, userChangeEnabledCmd)
rootCmd.AddCommand(userCmd)
}
@ -40,7 +40,7 @@ var userCmd = &cobra.Command{
var userListCmd = &cobra.Command{
Use: "list",
Short: "Shows a list of all users on this instance.",
Short: "Shows a list of all users.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
@ -74,3 +74,58 @@ var userListCmd = &cobra.Command{
table.Render()
},
}
var userCreateCmd = &cobra.Command{
Use: "create",
Short: "Create a new user.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
},
}
var userUpdateCmd = &cobra.Command{
Use: "update",
Short: "Update an existing user.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
},
}
var userDeleteCmd = &cobra.Command{
Use: "delete",
Short: "Delete a user.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
},
}
var userResetPasswordCmd = &cobra.Command{
Use: "reset-password",
Short: "Reset a users password, either through mailing them a reset link or directly.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
// need flags
},
}
var userChangeEnabledCmd = &cobra.Command{
Use: "toggle-status",
Short: "Enable or disable a user.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
// Flag to either enable or disable
},
}