Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AcceptHeader specifies the content type that the client is expecting. AcceptHeader = "Accept" // LDPlusJSONContentType specifies the linked data plus JSON content type. LDPlusJSONContentType = `application/ld+json` // ActivityStreamsContentType is the content type used for activity streams messages. ActivityStreamsContentType = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` )
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(pubKeyID string, req *http.Request) error
SignRequest does nothing.
type Option ¶
type Option func(options *options)
Option defines a transport option.
func WithHeader ¶
WithHeader specifies a header in the HTTP 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, publicKeyID *url.URL, getSigner, postSigner Signer, tm authTokenManager) *Transport
New returns a new transport.
Click to show internal directories.
Click to hide internal directories.