Versions in this module Expand all Collapse all v3 v3.7.7 Oct 25, 2022 v3.7.6 Oct 25, 2022 Changes in this version + const DefaultUnencryptedSuffix + const MacMismatch + const MetadataNotFound + func EmitAsMap(in TreeBranches) (map[string]interface{}, error) + func ToBytes(in interface{}) ([]byte, error) + type Cipher interface + Decrypt func(ciphertext string, key []byte, additionalData string) (plaintext interface{}, err error) + Encrypt func(plaintext interface{}, key []byte, additionalData string) (ciphertext string, err error) + type Comment struct + Value string + type EncryptedFileEmitter interface + EmitEncryptedFile func(Tree) ([]byte, error) + type EncryptedFileLoader interface + LoadEncryptedFile func(in []byte) (Tree, error) + type KeyGroup []keys.MasterKey + type Metadata struct + DataKey []byte + EncryptedRegex string + EncryptedSuffix string + KeyGroups []KeyGroup + LastModified time.Time + MessageAuthenticationCode string + ShamirThreshold int + UnencryptedRegex string + UnencryptedSuffix string + Version string + func (m *Metadata) MasterKeyCount() int + func (m *Metadata) UpdateMasterKeys(dataKey []byte) (errs []error) + func (m *Metadata) UpdateMasterKeysWithKeyServices(dataKey []byte, svcs []keyservice.KeyServiceClient) (errs []error) + func (m Metadata) GetDataKey() ([]byte, error) + func (m Metadata) GetDataKeyWithKeyServices(svcs []keyservice.KeyServiceClient) ([]byte, error) + type PlainFileEmitter interface + EmitPlainFile func(TreeBranches) ([]byte, error) + type PlainFileLoader interface + LoadPlainFile func(in []byte) (TreeBranches, error) + type Store interface + type Tree struct + Branches TreeBranches + FilePath string + Metadata Metadata + func (tree *Tree) GenerateDataKeyWithKeyServices(svcs []keyservice.KeyServiceClient) ([]byte, []error) + func (tree Tree) Decrypt(key []byte, cipher Cipher) (string, error) + func (tree Tree) Encrypt(key []byte, cipher Cipher) (string, error) + func (tree Tree) GenerateDataKey() ([]byte, []error) + type TreeBranch []TreeItem + func (branch TreeBranch) Set(path []interface{}, value interface{}) TreeBranch + func (branch TreeBranch) Truncate(path []interface{}) (interface{}, error) + type TreeBranches []TreeBranch + type TreeItem struct + Key interface{} + Value interface{} + type UserError interface + UserError func() string + type ValueEmitter interface + EmitValue func(interface{}) ([]byte, error)