activitypub

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 13 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(user *user_model.User) (pub, priv string, err error)

GetKeyPair function returns a user's private and public keys

func GetPrivateKey

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

GetPrivateKey function returns a user's private key

func GetPublicKey

func GetPublicKey(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(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