Add command stubs for all commands
Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
parent
99b0d311dd
commit
efa052f8ad
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user