delivery

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FailedToDelivery     = "THERE_ARE_REQUESTS_THAT_FAILED_TO_SEND"
	DeliverySuccessfully = "SEND_SUCCESSFULLY"
)

Variables

This section is empty.

Functions

func GetPrivateKey

func GetPrivateKey(privateKey string) crypto.PrivateKey

GetPrivateKey ParseRawPrivateKey -> crypto.PrivateKey.

func IsRemote

func IsRemote(inbox string) (bool, error)

IsRemote ...

func Verify

func Verify(r *http.Request, privateKey string) error

Verify ...

Types

type Delivery

type Delivery struct {
	PublicKeyId string
	PrivateKey  string
	Body        []byte
}

Delivery ... https://www.w3.org/TR/activitypub/#delivery

func New

func New(publicKeyId string, privateKey string, body []byte) *Delivery

func (*Delivery) Do

func (i *Delivery) Do(inbox string) (*http.Response, error)

Jump to

Keyboard shortcuts

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