1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-29 06:33:19 +00:00

Release source code under the Fair Source 5 License

This commit is contained in:
Gilbert Chen
2017-05-22 22:01:02 -04:00
parent 3df53ae610
commit 04aaaaf82d
48 changed files with 17373 additions and 0 deletions

30
duplicacy_keyring.go Normal file
View File

@@ -0,0 +1,30 @@
// Copyright (c) Acrosync LLC. All rights reserved.
// Licensed under the Fair Source License 0.9 (https://fair.io/)
// User Limitation: 5 users
// +build !windows
package duplicacy
import (
"github.com/gilbertchen/keyring"
)
func SetKeyringFile(path string) {
// We only use keyring file on Windows
}
func keyringGet(key string) (value string) {
value, err := keyring.Get("duplicacy", key)
if err != nil {
LOG_DEBUG("KEYRING_GET", "Failed to get the value from the keyring: %v", err)
}
return value
}
func keyringSet(key string, value string) {
err := keyring.Set("duplicacy", key, value)
if err != nil {
LOG_DEBUG("KEYRING_GET", "Failed to store the value to the keyring: %v", err)
}
}