Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a "middleware" that tries to load an ActivityPub/ActivityStream document from the Interwebs.
If the server does not respond with an ActvityPub content-type then the request is forwarded to the inner client.
func (*Client) SetRootClient ¶
type ClientOption ¶
type ClientOption func(*Client)
func WithKeyPairFunc ¶
func WithKeyPairFunc(fn KeyPairFunc) ClientOption
WithKeyPairFunc is an Option that sets the ActorGetter for a Client. This allows the Client to retrieve the public key ID and private key for a given URL only when needed, rather than performing expensive database queries ahead of time.
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
type KeyPairFunc ¶
type KeyPairFunc func() (publicKeyID string, privateKey crypto.PrivateKey)
Click to show internal directories.
Click to hide internal directories.