Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommanderInstalled ¶
func CommanderInstalled() bool
CommanderInstalled checks if the Keeper Commander tool is installed on the current system.
Returns:
bool: True if the Keeper Commander tool is installed, false otherwise.
Example:
if !CommanderInstalled() {
log.Fatal("Keeper Commander is not installed.")
}
func LoggedIn ¶
func LoggedIn() bool
LoggedIn checks if the user is logged into their Keeper vault.
Returns:
bool: True if the user is logged into their Keeper vault, false otherwise.
Example:
if !LoggedIn() {
log.Fatal("Not logged into Keeper vault.")
}
func SearchRecords ¶
SearchRecords searches the user's Keeper records for records that match the provided search term.
Parameters:
searchTerm: A string representing the term to search for in the Keeper records.
Returns:
string: The unique identifier (UID) of the first Keeper record that matches the search term. error: An error if the Keeper records cannot be searched or if the search term does not match any records.
Example:
uid, err := SearchRecords("search term")
if err != nil {
log.Fatalf("Failed to search records: %v", err)
}
log.Printf("Found matching record with UID: %s\n", uid)
Types ¶
type Record ¶
type Record struct {
UID string
Title string
URL string
Username string
Password string
TOTP string
Note string
}
Record represents a user's record in the Keeper application. Each record includes a unique identifier (UID), title, URL, username, password, TOTP, and a note.
func RetrieveRecord ¶
RetrieveRecord retrieves a user's Keeper record using the provided unique identifier (keeperUID).
Parameters:
keeperUID: A string representing the unique identifier of the Keeper record to retrieve.
Returns:
Record: The retrieved Keeper record. error: An error if the Keeper record cannot be retrieved.
Example:
record, err := RetrieveRecord("1234abcd")
if err != nil {
log.Fatalf("Failed to retrieve record: %v", err)
}
log.Printf("Retrieved record: %+v\n", record)