Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAttackFile()
- func CreateAttack() error
- func GetAttackFileName() (f string, err error)
- func GetConfigPath() (p string, err error)
- func GetEncryptedFilesDir() (p string, err error)
- func GetHomeDir() (d string, err error)
- func GetPassDir() (d string, err error)
- func GetSiteFileBytes() (b []byte)
- func GetSitesFile() (d string, err error)
- func PassConfigExists() (bool, error)
- func PassDirExists() (bool, error)
- func PassFileDirExists() (bool, error)
- func Prompt(prompt string) (s string, err error)
- func PromptPass(prompt string) (pass string, err error)
- func SitesVaultExists() (bool, error)
- func ToClipboard(s string)
- func UpdateVault(s SiteFile) (err error)
- type ConfigFile
- type PassFile
- type SiteFile
- type SiteInfo
Constants ¶
const ( // ConfigFileName is the name of the passgo config file. ConfigFileName = "config" // SiteFileName is the name of the passgo password store file. SiteFileName = "sites.json" // AttackFileName is the name of the passgo under attack file. AttackFileName = "attacked" // EncryptedFileDir is the name of the passgo encrypted file dir. EncryptedFileDir = "files" )
Variables ¶
var (
// MasterPassPrompt is the standard prompt string for all passgo
MasterPassPrompt = "Enter master password"
)
Functions ¶
func CheckAttackFile ¶
func CheckAttackFile()
CheckAttackFile will determine if the attack file exists.
func GetAttackFileName ¶
GetAttackFileName returns the full path of the attack file.
func GetConfigPath ¶
GetConfigPath is used to get the user's passgo directory.
func GetEncryptedFilesDir ¶
GetFilesDir is used to get the directory that we store encrypted files in.
func GetHomeDir ¶
func GetPassDir ¶
GetPassDir is used to return the user's passgo directory.
func GetSiteFileBytes ¶
func GetSiteFileBytes() (b []byte)
GetSiteFileBytes returns the bytes instead of a SiteFile
func GetSitesFile ¶
GetSitesFile will return the user's passgo vault.
func PassConfigExists ¶
PassConfigExists is used to determine if the passgo config file exists in the user's passgo directory.
func PassDirExists ¶
PassDirExists is used to determine if the passgo directory in the user's home directory exists.
func PassFileDirExists ¶
func PromptPass ¶
PromptPass will prompt user's for a password by terminal.
func SitesVaultExists ¶
SitesVaultExists is used to determine if the password store exists in the user's passgo directory.
func ToClipboard ¶
func ToClipboard(s string)
func UpdateVault ¶
UpdateVault is used to replace the current password vault.
Types ¶
type ConfigFile ¶
type ConfigFile struct { MasterKeyPrivSealed []byte PubKeyHmac []byte SiteHmac []byte MasterPubKey [32]byte MasterPassKeySalt [32]byte HmacSalt [32]byte SiteHmacSalt [32]byte }
ConfigFile represents the passgo config file.
func ReadConfig ¶
func ReadConfig() (c ConfigFile, err error)
ReadConfig is used to return the passgo ConfigFile.
func (*ConfigFile) SaveFile ¶
func (c *ConfigFile) SaveFile() (err error)
SaveFile is used by ConfigFiles to update the passgo config.
type PassFile ¶
type PassFile interface {
SaveFile() (err error)
}
PassFile is an interface for how all passgo files should be saved.