Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigFlag is the flag for the padl config file path ConfigFlag = cli.StringFlag{ Name: "config, c", Usage: "override default config file path", } // VerboseFlag enables/disables process logs VerboseFlag = cli.BoolFlag{ Name: "verbose, vv", Usage: "print process logs", } // TokenFlag auth token TokenFlag = cli.StringFlag{ Name: "auth-token", Usage: "override defult token", } // HostURLFlag host server url HostURLFlag = cli.StringFlag{ Name: "host-url", Usage: "override default host url", } )
View Source
var AccountCmds = cli.Command{ Name: "account", Aliases: []string{"a"}, Usage: "Manage accounts and authentication", Subcommands: []cli.Command{ { Name: "create", Usage: "create a new account on a padl server", Flags: []cli.Flag{ emailFlag, passwordFlag, }, Before: createConfigIfDoesNotExist, Action: createAccountHandler, }, { Name: "login", Usage: "login to an account on a padl server", Flags: []cli.Flag{ emailFlag, passwordFlag, pathFlag, }, Before: createConfigIfDoesNotExist, Action: loginAccountHandler, }, { Name: "rotate-key", Usage: "create a fresh user key and publish the public key", Flags: []cli.Flag{ pathFlag, }, Action: rotateKeyHandler, }, { Name: "show", Usage: "show account details based on padl token", Flags: []cli.Flag{ jsonFlag, }, Action: showAccountHandler, }, }, }
AccountCmds - manage accounts and auth flows
View Source
var ConfigCmds = cli.Command{ Name: "config", Aliases: []string{"c"}, Usage: "Manage configuration and CLI settings", Subcommands: []cli.Command{ { Name: "set", Usage: "create configuration file with given options", Flags: []cli.Flag{ asMandatory(urlFlag), ConfigFlag, }, Before: configSetValidator, Action: configSetHandler, }, { Name: "show", Usage: "show contents of set configuration file", Flags: []cli.Flag{ ConfigFlag, }, Action: configShowHandler, }, }, }
ConfigCmds is the CLI command object for the config operation
View Source
var KMSCmds = cli.Command{ Name: "kms", Aliases: []string{"k"}, Usage: "Inspect padl-managed public keys", Subcommands: []cli.Command{ { Name: "public", Usage: "get an RSA public key for inspection", Flags: []cli.Flag{ jsonFlag, asMandatory(idFlag), }, Before: publicKeyValidator, Action: publicKeyHandler, }, }, }
KMSCmds - manage padl-managed public keys
View Source
var PadlfileCmds = cli.Command{ Name: "file", Aliases: []string{"f"}, Usage: "Manage padlfile", Subcommands: []cli.Command{ { Name: "pull", Usage: "update padlfile to match server state", Flags: []cli.Flag{ withDefault(fmtFlag, "yaml"), privateKeyFlag, pathFlag, }, Before: padlfilePullValidator, Action: padlfilePullHandler, }, { Name: "secret", Usage: "manage secrets for project", Subcommands: []cli.Command{ { Name: "set", Usage: "set a secret in a project", Flags: []cli.Flag{ asMandatory(nameFlag), asMandatory(secretFlag), withDefault(fmtFlag, "yaml"), privateKeyFlag, pathFlag, }, Before: padlfileSetSecretValidator, Action: padlfileSetSecretHandler, }, { Name: "show", Usage: "see a specific secret in a project", Flags: []cli.Flag{ asMandatory(nameFlag), withDefault(fmtFlag, "yaml"), privateKeyFlag, pathFlag, }, Before: padlfileShowSecretValidator, Action: padlfileShowSecretHandler, }, { Name: "remove", Usage: "delete a secret from a project", Flags: []cli.Flag{ asMandatory(nameFlag), withDefault(fmtFlag, "yaml"), privateKeyFlag, pathFlag, }, Before: func(ctx *cli.Context) error { if err := checkCanModifyPadlFile(ctx); err != nil { return err } return padlfileRemoveSecretValidator(ctx) }, Action: padlfileRemoveSecretHandler, }, }, }, }, }
PadlfileCmds - manage padlfile
View Source
var ProjectCmds = cli.Command{ Name: "project", Aliases: []string{"p"}, Usage: "Manage projects", Subcommands: []cli.Command{ { Name: "create", Usage: "create a new padl project", Flags: []cli.Flag{ asMandatory(nameFlag), asMandatory(descriptionFlag), withDefaultInt(bitsFlag, 2048), pathFlag, withDefault(fmtFlag, "yaml"), }, Before: createProjectValidator, Action: createProjectHandler, }, { Name: "delete", Usage: "delete a padl project", Flags: []cli.Flag{ asMandatory(projectFlag), }, Before: deleteProjectValidator, Action: deleteProjectHandler, }, { Name: "get", Usage: "get a padl project by name", Flags: []cli.Flag{ asMandatory(projectFlag), jsonFlag, }, Before: getProjectValidator, Action: getProjectHandler, }, { Name: "list", Usage: "get all your padl projects", Flags: []cli.Flag{ jsonFlag, }, Action: projectListHandler, }, { Name: "service-account", Usage: "manage secrets for project", Subcommands: []cli.Command{ { Name: "create", Usage: "create a service account in the project", Flags: []cli.Flag{ asMandatory(projectFlag), asMandatory(nameFlag), jsonFlag, }, Before: addServiceAccountValidator, Action: projectAddServiceAccountHandler, }, { Name: "remove", Usage: "delete a service account from the project", Flags: []cli.Flag{ asMandatory(projectFlag), asMandatory(nameFlag), }, Before: removeServiceAccountValidator, Action: projectRemoveServiceAccountHandler, }, }, }, { Name: "user", Usage: "manage users for project", Subcommands: []cli.Command{ { Name: "add", Usage: "add a user to a project", Flags: []cli.Flag{ asMandatory(projectFlag), asMandatory(emailFlag), withDefaultInt(privFlag, 0), }, Before: addUserValidator, Action: addUserHandler, }, { Name: "remove", Usage: "remove a user from a project", Flags: []cli.Flag{ asMandatory(projectFlag), asMandatory(emailFlag), }, Before: removeUserValidator, Action: removeUserHandler, }, }, }, }, }
ProjectCmds - manage projects
View Source
var RunCmds = cli.Command{ Name: "run", Aliases: []string{"r"}, Usage: "Run a command with secrets in the environment", Flags: []cli.Flag{ asMandatory(nameFlag), withDefault(fmtFlag, "yaml"), privateKeyFlag, pathFlag, }, Before: checkCanModifyPadlFile, Action: runHandler, }
RunCmds - run a command with injected secrets
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.