tresor

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallbackForPassword

func CallbackForPassword(keys []openpgp.Key, symmetric bool) ([]byte, error)

CallbackForPassword implements https://godoc.org/golang.org/x/crypto/openpgp#PromptFunction

func CopyMetadata

func CopyMetadata(bucketName string, sourceKey string, destinationKey string) error

CopyMetadata copies custom meta data from a remote object to another

func CopyObject

func CopyObject(bucketName string, sourceKey string, destinationKey string) (err error)

CopyObject copies a remote object to a different remote key

func CreateMetadata

func CreateMetadata(recipient *openpgp.Entity, signer *openpgp.Entity, extension string, armored bool) storage.ObjectAttrsToUpdate

CreateMetadata create metadata to be stored along with GCS objects

func DecryptBytes

func DecryptBytes(ring openpgp.EntityList, payload []byte) (plain []byte, err error)

DecryptBytes decrypts and verifies a byte sequence

func EncryptBytes

func EncryptBytes(recipient *openpgp.Entity, signer *openpgp.Entity, plainBytes []byte, armored bool) (encryptedBytes []byte, err error)

EncryptBytes encrypts and signs a byte sequence

func GetUserPassword

func GetUserPassword(keyID string) ([]byte, error)

GetUserPassword promtps for a user password to decrypt private keys

func LoadArmoredKey

func LoadArmoredKey(location string) (key *openpgp.Entity, err error)

LoadArmoredKey loads an armored GPG keys from local disk

func QueryStorage

func QueryStorage(bucketName string, prefixFilter string, versions bool) (attributes []*storage.ObjectAttrs, err error)

QueryStorage queries the remote storage to find keys

func ReadMetadata

func ReadMetadata(bucketName string, key string) (attributes *storage.ObjectAttrs, err error)

ReadMetadata reads remote metadata for an object

func ReadObject

func ReadObject(bucketName string, key string, version int64) (payload []byte, err error)

ReadObject reads a remote object

func RemoveObject

func RemoveObject(bucketName string, key string) (err error)

RemoveObject removes an object from remote storage

func WriteMetadata

func WriteMetadata(bucketName string, key string, meta storage.ObjectAttrsToUpdate) (err error)

WriteMetadata writes a set of tags on a remote object

func WriteObject

func WriteObject(bucketName string, key string, payload []byte) (err error)

WriteObject write a byte sequence to remote storage

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL