Documentation ¶
Index ¶
- Constants
- Variables
- func AddKey(info *infofile.InfoFile, masterKey []byte, gpgKey string) (keyId string, errMessage string, err error)
- func GetMasterKey(info *infofile.InfoFile) (masterKey []byte, keyId string, errMessage string, err error)
- func NewAddCmd() *cobra.Command
- func NewExecError(errType string, errMessage string, errData error) error
- func NewInfoFile(gpgKey string) (info *infofile.InfoFile, errMessage string, err error)
- func NewLsCmd() *cobra.Command
- func NewRepoCmd() *cobra.Command
- func NewRepoInfoCmd() *cobra.Command
- func NewRepoInitCmd() *cobra.Command
- func NewRepoKeyAddCmd() *cobra.Command
- func NewRepoKeyCmd() *cobra.Command
- func NewRepoKeyLsCmd() *cobra.Command
- func NewRepoKeyRmCmd() *cobra.Command
- func NewRepoKeyTestCmd() *cobra.Command
- func NewRepoUpgradeCmd() *cobra.Command
- func NewRmCmd() *cobra.Command
- func NewRootCmd() *cobra.Command
- func NewServeCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func PromptPassphrase() (string, error)
- func UpgradeInfoFile(info *infofile.InfoFile) (errMessage string, err error)
- type ExecError
Constants ¶
const ( ErrorApp = "app" ErrorUser = "user" )
Error types
Variables ¶
var PromptuiStdin io.ReadCloser = os.Stdin
Input stream for usage with promptui; this can be overridden by tests
var PromptuiStdout io.WriteCloser = os.Stdout
Output stream for usage with promptui; this can be overridden by tests
Functions ¶
func AddKey ¶ added in v0.3.0
func AddKey(info *infofile.InfoFile, masterKey []byte, gpgKey string) (keyId string, errMessage string, err error)
AddKey adds a key to an info file If the GPG Key is empty, will prompt for a passphrase
func GetMasterKey ¶ added in v0.2.0
func GetMasterKey(info *infofile.InfoFile) (masterKey []byte, keyId string, errMessage string, err error)
GetMasterKey gets the master key, either unwrapping it with a passphrase or with GPG
func NewExecError ¶ added in v0.5.0
func NewInfoFile ¶ added in v0.3.0
NewInfoFile generates a new info file with a brand-new master key, wrapped either with a passphrase-derived key, or with GPG
func NewRepoInfoCmd ¶ added in v0.5.1
NewRepoInfoCmd is for "prvt repo info"
func NewRepoInitCmd ¶ added in v0.5.0
NewRepoInitCmd is for "prvt repo init"
func NewRepoKeyAddCmd ¶ added in v0.5.0
NewRepoKeyAddCmd is for "prvt repo key add"
func NewRepoKeyCmd ¶ added in v0.5.0
NewRepoKeyCmd is for "prvt repo key"
func NewRepoKeyLsCmd ¶ added in v0.5.0
NewRepoKeyLsCmd is for "prvt repo key ls"
func NewRepoKeyRmCmd ¶ added in v0.5.0
NewRepoKeyRmCmd is for "prvt repo key rm"
func NewRepoKeyTestCmd ¶ added in v0.5.0
NewRepoKeyTestCmd is for "prvt repo key test"
func NewRepoUpgradeCmd ¶ added in v0.5.0
NewRepoUpgradeCmd is for "prvt repo upgrade"
func NewRootCmd ¶ added in v0.5.0
NewRootCmd returns the root command
func NewServeCmd ¶ added in v0.5.0
NewServeCmd is for "prvt serve"
func NewVersionCmd ¶ added in v0.5.0
NewVersionCmd is for "prvt version"
func PromptPassphrase ¶ added in v0.2.0
PromptPassphrase prompts the user for a passphrase
Types ¶
type ExecError ¶ added in v0.5.0
ExecError is a custom error object that implements the error interface