Documentation ¶
Index ¶
- Variables
- func Check(id string, password string, key string) (bool, error)
- func Clean() error
- func Delete(id string) error
- func FilePath(id string) string
- func Get(id string, key string) (string, error)
- func GetFileEnding() string
- func GetStorePath() string
- func List() ([]string, error)
- func NormalizeId(path string) string
- func Overwrite(id string, password string, key string) error
- func Set(id string, oldPassword string, newPassword string, key string) error
- func SetFileEnding(e string)
- func SetStorePath(path string)
- func Unset(id string, password string, key string) error
Constants ¶
This section is empty.
Variables ¶
var StorageDirMode os.FileMode = 0700
StorageDirMode controls the directory permission set by this package.
var StorageFileMode os.FileMode = 0600
StorageFileMode controls the file permission set by this package.
Functions ¶
func Check ¶
Check an existing password for equality with the provided password. key is the encryption secret for storage.
func FilePath ¶
FilePath returns the storage filepath of a given password-id with system-specific path separators. It accepts system-unspecific or mixed id separators, i.e. forward- and backward-slashes are treated as the same character.
func GetFileEnding ¶
func GetFileEnding() string
GetFileEnding returns the current file ending of storage files.
func GetStorePath ¶
func GetStorePath() string
GetStorePath returns the current storage path with system-specific path separators.
func NormalizeId ¶
NormalizeId transforms path to lower case letters and normalizes the path separator
func Overwrite ¶
Overwrite an existing password or create a new one. key is the encryption secret for storage.
func Set ¶
Set an existing password-id or create a new one. oldPassword must match the currently stored password. key is the encryption secret for storage.
func SetFileEnding ¶
func SetFileEnding(e string)
SetFileEnding accepts a new file ending for storage files.
func SetStorePath ¶
func SetStorePath(path string)
SetStorePath accepts a new storage path with system-unspecific or mixed path separators.
Types ¶
This section is empty.