Implement attachment checking in CLI (#141)

This commit is contained in:
Knut Ahlers 2023-10-21 17:12:08 +02:00 committed by GitHub
parent 34275baa2f
commit 9a530e1c66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 374 additions and 17 deletions

View file

@ -19,9 +19,18 @@ import (
"github.com/Luzifer/go-openssl/v4"
)
type (
// HTTPClientIntf describes a minimal interface to be fulfilled
// by the given HTTP client. This can be used for mocking and to
// pass in authenticated clients
HTTPClientIntf interface {
Do(*http.Request) (*http.Response, error)
}
)
// HTTPClient defines the client to use for create and fetch requests
// and can be overwritten to provide authentication
var HTTPClient = http.DefaultClient
var HTTPClient HTTPClientIntf = http.DefaultClient
// KeyDerivationFunc defines the key derivation algorithm used in OTS
// to derive the key / iv from the password for encryption. You only