Documentation ¶
Index ¶
- Variables
- func EnhancedGet(client *http.Client, uri string, requestHeaders http.Header, ...) (*http.Response, error)
- func VerifyClearSignedGPGSignature(keyring *GPGKeyRing, messageWithSignature []byte) error
- func VerifyDetachedGPGSignature(keyring *GPGKeyRing, message, armoredSignature []byte) error
- type FullReader
- type GPGKeyRing
Constants ¶
This section is empty.
Variables ¶
var LogIndividualTransfers = parseBool(os.Getenv("LOG_TRANSFERS"))
LogIndividualTransfers is set to the boolean value of the LOG_TRANSFERS environment variable.
var Version string
Version is the version number of swift-http-import.
Functions ¶
func EnhancedGet ¶
func EnhancedGet(client *http.Client, uri string, requestHeaders http.Header, segmentBytes uint64) (*http.Response, error)
EnhancedGet is like http.Client.Get(), but recognizes if the HTTP server understands range requests, and downloads the file in segments in that case.
func VerifyClearSignedGPGSignature ¶
func VerifyClearSignedGPGSignature(keyring *GPGKeyRing, messageWithSignature []byte) error
VerifyClearSignedGPGSignature takes a clear signed message and a GPGKeyRing to check if the signature is valid. If the key ring does not contain the concerning public key then the key is downloaded from a pool server and added to the existing key ring. A non-nil error is returned, if signature verification was unsuccessful.
func VerifyDetachedGPGSignature ¶
func VerifyDetachedGPGSignature(keyring *GPGKeyRing, message, armoredSignature []byte) error
VerifyDetachedGPGSignature takes a message, a detached signature, and a GPGKeyRing to check if the signature is valid. The detached signature is expected to be armored. If the key ring does not contain the concerning public key then the key is downloaded from a pool server and added to the existing key ring. A non-nil error is returned, if signature verification was unsuccessful.
Types ¶
type FullReader ¶
type FullReader struct {
Base io.ReadCloser
}
FullReader is an io.ReadCloser whose Read() implementation always fills the read buffer as much as possible by calling Base.Read() repeatedly.
func (*FullReader) Close ¶
func (r *FullReader) Close() error
Close implements the io.Reader interface.
type GPGKeyRing ¶
type GPGKeyRing struct { EntityList openpgp.EntityList Mux sync.RWMutex }
GPGKeyRing contains a list of openpgp Entities. It is used to verify different types of GPG signatures.