Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Database = &cli.Command{
Name: "database",
Usage: "ezBookkeeping database maintenance",
Subcommands: []*cli.Command{
{
Name: "update",
Usage: "Update database structure",
Action: updateDatabaseStructure,
},
},
}
Database represents the database command
View Source
var SecurityUtils = &cli.Command{ Name: "security", Usage: "ezBookkeeping security utilities", Subcommands: []*cli.Command{ { Name: "gen-secret-key", Usage: "Generate a random secret key", Action: genSecretKey, Flags: []cli.Flag{ &cli.IntFlag{ Name: "length", Aliases: []string{"l"}, Required: false, DefaultText: "32", Usage: "The length of secret key", }, }, }, }, }
SecurityUtils represents the security command
View Source
var UserData = &cli.Command{ Name: "userdata", Usage: "ezBookkeeping user data maintenance", Subcommands: []*cli.Command{ { Name: "user-add", Usage: "Add new user", Action: addNewUser, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "New user name", }, &cli.StringFlag{ Name: "email", Aliases: []string{"m"}, Required: true, Usage: "New user email", }, &cli.StringFlag{ Name: "nickname", Aliases: []string{"i"}, Required: true, Usage: "New user nickname", }, &cli.StringFlag{ Name: "password", Aliases: []string{"p"}, Required: true, Usage: "New user password", }, &cli.StringFlag{ Name: "default-currency", Aliases: []string{"c"}, Required: true, Usage: "New user default currency", }, }, }, { Name: "user-get", Usage: "Get specified user info", Action: getUserInfo, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-modify-password", Usage: "Modify user password", Action: modifyUserPassword, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, &cli.StringFlag{ Name: "password", Aliases: []string{"p"}, Required: true, Usage: "User new password", }, }, }, { Name: "user-enable", Usage: "Enable specified user", Action: enableUser, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-disable", Usage: "Disable specified user", Action: disableUser, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-resend-verify-email", Usage: "Resend user verify email", Action: resendUserVerifyEmail, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-set-email-verified", Usage: "Set user email address verified", Action: setUserEmailVerified, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-set-email-unverified", Usage: "Set user email address unverified", Action: setUserEmailUnverified, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-delete", Usage: "Delete specified user", Action: deleteUser, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-2fa-disable", Usage: "Disable user 2fa setting", Action: disableUser2FA, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-session-list", Usage: "List all user sessions", Action: listUserTokens, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "user-session-clear", Usage: "Clear user all sessions", Action: clearUserTokens, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "send-password-reset-mail", Usage: "Send password reset mail", Action: sendPasswordResetMail, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "transaction-check", Usage: "Check whether user all transactions and accounts are correct", Action: checkUserTransactionAndAccount, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, }, }, { Name: "transaction-export", Usage: "Export user all transactions to file", Action: exportUserTransaction, Flags: []cli.Flag{ &cli.StringFlag{ Name: "username", Aliases: []string{"n"}, Required: true, Usage: "Specific user name", }, &cli.StringFlag{ Name: "file", Aliases: []string{"f"}, Required: true, Usage: "Specific exported file path (e.g. transaction.csv)", }, &cli.StringFlag{ Name: "type", Aliases: []string{"t"}, Required: false, Usage: "Export file type, support csv or tsv, default is csv", }, }, }, }, }
UserData represents the data command
View Source
var Utilities = &cli.Command{ Name: "utility", Usage: "ezBookkeeping utilities", Subcommands: []*cli.Command{ { Name: "parse-default-request-id", Usage: "Parse a request id which is generated by default request generator and show the details", Action: parseRequestId, Flags: []cli.Flag{ &cli.StringFlag{ Name: "id", Required: true, Usage: "Request ID", }, }, }, { Name: "send-test-mail", Usage: "Send an email to specified e-mail address", Action: sendTestMail, Flags: []cli.Flag{ &cli.StringFlag{ Name: "to", Required: true, Usage: "To e-mail address", }, }, }, }, }
Utilities represents the utilities command
View Source
var WebServer = &cli.Command{
Name: "server",
Usage: "ezBookkeeping web server operation",
Subcommands: []*cli.Command{
{
Name: "run",
Usage: "Run ezBookkeeping web server",
Action: startWebServer,
},
},
}
WebServer represents the server command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.