Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoOpSigner ¶
type NoOpSigner struct{}
NoOpSigner is a signer that does nothing. This signer should only be used by tests.
func DefaultSigner ¶
func DefaultSigner() *NoOpSigner
DefaultSigner returns a default, no-op signer. This signer should only be used by tests.
func (*NoOpSigner) SignRequest ¶
func (s *NoOpSigner) SignRequest(crypto.PrivateKey, string, *http.Request, []byte) error
SignRequest does nothing.
type Signer ¶
type Signer interface {
SignRequest(pKey crypto.PrivateKey, pubKeyID string, r *http.Request, body []byte) error
}
Signer signs an HTTP request and adds the signature to the header of the request.
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport implements a client-side transport that Gets and Posts requests using HTTP signatures.
func Default ¶
func Default() *Transport
Default returns a default transport that uses the default HTTP client and no HTTP signatures. This transport should only be used by tests.
func New ¶
func New(client httpClient, privateKey crypto.PrivateKey, publicKeyID *url.URL, getSigner, postSigner Signer) *Transport
New returns a new transport.
Click to show internal directories.
Click to hide internal directories.