Documentation
¶
Overview ¶
Package model holds structs used for passing in data and retrieving results from dare operations
Index ¶
- func RandomNonce() ([24]byte, error)
- type DecryptRequest
- type DecryptResponse
- type EncryptRequest
- type EncryptResponse
- type Hash
- type Key
- func (k *Key) GetEncryptionKey() ([32]byte, error)
- func (k *Key) GetNonce() ([24]byte, error)
- func (k *Key) NewDecryptRequest(source, destinationRoot string) (*DecryptRequest, error)
- func (k *Key) NewEncryptRequest(source, destinationRoot, regex string) (*EncryptRequest, error)
- func (k *Key) Sanitize() error
- type KeyOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DecryptRequest ¶
type DecryptRequest struct {
Targets map[string]string `json:"targets,omitempty" mapstructure:"targets,omitempty"`
UUID string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
DestinationRootPath string `json:"destination_root_path,omitempty" mapstructure:"destination_root_path,omitempty"`
Key [32]byte
Nonce [24]byte
// contains filtered or unexported fields
}
DecryptRequest ...
type DecryptResponse ¶
type DecryptResponse struct {
DecryptedArtifacts map[string]Hash `json:"decrypted_artifacts,omitempty" mapstructure:"decrypted_artifacts,omitempty"`
UUID string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
// contains filtered or unexported fields
}
DecryptResponse ...
func (*DecryptResponse) String ¶
func (r *DecryptResponse) String() []string
type EncryptRequest ¶
type EncryptRequest struct {
Targets map[string]string `json:"targets,omitempty" mapstructure:"targets,omitempty"`
UUID string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
DestinationRootPath string `json:"destination_root_path,omitempty" mapstructure:"destination_root_path,omitempty"`
Key [32]byte `json:"-" `
Nonce [24]byte `json:"-" `
// contains filtered or unexported fields
}
EncryptRequest ...
type EncryptResponse ¶
type EncryptResponse struct {
EncryptedArtifacts map[string]Hash `json:"encrypted_artifacts,omitempty" mapstructure:"encrypted_artifacts,omitempty"`
RandomNonce string `json:"random_nonce,omitempty" mapstructure:"random_nonce,omitempty"`
UUID string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
// contains filtered or unexported fields
}
EncryptResponse ...
func (*EncryptResponse) String ¶
func (r *EncryptResponse) String() []string
type Hash ¶
type Hash struct {
Md5 string `json:"md5,omitempty" mapstructure:"md5,omitempty"`
Sha256 string `json:"sha256,omitempty" mapstructure:"sha256,omitempty"`
}
Hash stores file hash values
type Key ¶
type Key struct {
Targets map[string]string `json:"targets,omitempty" mapstructure:"targets,omitempty"`
UUID string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
DestinationRootPath string `json:"destination_root_path,omitempty" mapstructure:"destination_root_path,omitempty"`
EncryptionKey string `json:"encryption_key,omitempty" mapstructure:"encryption_key,omitempty"`
Nonce string `json:"nonce,omitempty" mapstructure:"nonce,omitempty"`
// contains filtered or unexported fields
}
Key ...
func (*Key) GetEncryptionKey ¶
GetEncryptionKey ...
func (*Key) NewDecryptRequest ¶
func (k *Key) NewDecryptRequest(source, destinationRoot string) (*DecryptRequest, error)
NewDecryptRequest adds a target path to Decrypt
func (*Key) NewEncryptRequest ¶
func (k *Key) NewEncryptRequest(source, destinationRoot, regex string) (*EncryptRequest, error)
NewEncryptRequest adds a target path to encrypt
type KeyOption ¶
KeyOption ...
func WithEncryptionKey ¶
WithEncryptionKey sets encryption key
func WithKeyFile ¶
WithKeyFile reads encryption key from file
Click to show internal directories.
Click to hide internal directories.