activitypub

package
v0.0.0-...-e61ee7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActivityStreamsContentType const
	ActivityStreamsContentType = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
)

Variables

This section is empty.

Functions

func CurrentTime

func CurrentTime() string

Gets the current time as an RFC 2616 formatted string RFC 2616 requires RFC 1123 dates but with GMT instead of UTC

func GetKeyPair

func GetKeyPair(ctx context.Context, user *user_model.User) (pub, priv string, err error)

GetKeyPair function returns a user's private and public keys

func GetPrivateKey

func GetPrivateKey(ctx context.Context, user *user_model.User) (priv string, err error)

GetPrivateKey function returns a user's private key

func GetPublicKey

func GetPublicKey(ctx context.Context, user *user_model.User) (pub string, err error)

GetPublicKey function returns a user's public key

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client struct

func NewClient

func NewClient(ctx context.Context, user *user_model.User, pubID string) (c *Client, err error)

NewClient function

func (*Client) NewRequest

func (c *Client) NewRequest(b []byte, to string) (req *http.Request, err error)

NewRequest function

func (*Client) Post

func (c *Client) Post(b []byte, to string) (resp *http.Response, err error)

Post function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL