Documentation
¶
Index ¶
- Variables
- func DecryptFiles(p string, key string) (string, error)
- func DownloadData(url string, filePath string) error
- func EncryptFiles(args []string, recipient string, keyPath string) (string, error)
- func LoadConfig() error
- func LoadKey(recipient string, url string) (string, error)
- func ParsePublicKey(keyPath string) (*openpgp.Entity, error)
- func PostData(sender, recipient, file, url string) error
- func SaveConfig() error
Constants ¶
This section is empty.
Variables ¶
var Config map[string]string
Config holds our client config
Functions ¶
func DecryptFiles ¶
DecryptFiles decrypts then unzips a file using a private key and returns the path of the resulting file/folder on success zip step should be optional TODO
func DownloadData ¶
DownloadData retrieves a file from the server and saves contents at filePath
func EncryptFiles ¶
EncryptFiles zips then encrypts our arguments (files or folders) using a public key
func LoadConfig ¶
func LoadConfig() error
LoadConfig reads or creates our config file at ~/.sendto/config
func LoadKey ¶
LoadKey loads the key associated with this username, first by loooking at ~/.sendto/users/recipient/key.pub or if that fails by fetching it from the internet and saving at that location it returns the path of the downloaded key file
func ParsePublicKey ¶
ParsePublicKey parses the given public key file
func SaveConfig ¶
func SaveConfig() error
SaveConfig saves our config out to a file at ~/.sendto/config
Types ¶
This section is empty.