Documentation ¶
Index ¶
- Variables
- func MustDecrypt(cofferFile, alias string) []byte
- func MustDownload(cofferFile, alias, bucket string)
- func MustDownloadSync(cofferFile, alias, bucket, base string)
- func MustEncrypt(cofferFile, alias string)
- func MustSync(cofferFile, alias, base string)
- func MustUpload(cofferFile, alias, bucket string)
- type Bundle
- type Coffer
- type DataKey
- type FileData
- type KeyManagement
- type ObjectStorage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CofferBlockSize size of the key CofferBlockSize = 32 // OwnerRead is the default mode set for new coffer files, note the octal number OwnerRead = os.FileMode(0600) // Version the version of the coffer file Version = "2.0.0" )
Functions ¶
func MustDecrypt ¶
MustDecrypt decrypt the supplied file
func MustDownload ¶
func MustDownload(cofferFile, alias, bucket string)
MustDownload download the file from the supplied s3 bucket
func MustDownloadSync ¶ added in v1.1.0
func MustDownloadSync(cofferFile, alias, bucket, base string)
MustDownloadSync download the file from the supplied s3 bucket and sync it to the filesystem
func MustUpload ¶
func MustUpload(cofferFile, alias, bucket string)
MustUpload upload the file to the supplied s3 bucket
Types ¶
type Bundle ¶
Bundle bundle of files and their related information
func (*Bundle) MustValidate ¶
func (b *Bundle) MustValidate()
MustValidate checks the validity of the bundle
type Coffer ¶
type Coffer struct { Name string `yaml:"name,omitempty"` Version string `yaml:"version,omitempty"` Key string `yaml:"key,omitempty"` CipherText string `yaml:"ct,omitempty"` }
Coffer used as the container for an encrypted coffer
func DecodeCoffer ¶
DecodeCoffer decode the coffer file
type FileData ¶
type FileData struct { Mode uint32 `yaml:"mode"` Owner string `yaml:"owner"` Group string `yaml:"group"` Content string `yaml:"content"` }
FileData an encoded file with it's permissions
func (*FileData) MustValidate ¶
MustValidate checks the validity of the file data structure.
type KeyManagement ¶
type KeyManagement interface { GenerateDataKey(*kms.GenerateDataKeyInput) (*kms.GenerateDataKeyOutput, error) Decrypt(*kms.DecryptInput) (*kms.DecryptOutput, error) }
KeyManagement is a sub-set of the capabilities of the KMS client.
type ObjectStorage ¶
type ObjectStorage interface { ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error) DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error) GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error) }
ObjectStorage is a sub-set of the capabilities of the S3 client.
Click to show internal directories.
Click to hide internal directories.