Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityPubServer ¶
type ActivityPubServer struct {
Domain string
PrivateKey *rsa.PrivateKey
PublicKey *rsa.PublicKey
BaseURL string
}
func NewActivityPubServer ¶
func NewActivityPubServer(domain, baseURL string) *ActivityPubServer
func (*ActivityPubServer) ArticleToNote ¶
func (aps *ActivityPubServer) ArticleToNote(article *models.Article, newsgroup string) *Note
func (*ActivityPubServer) CreateNewsgroupActor ¶
func (aps *ActivityPubServer) CreateNewsgroupActor(newsgroup *models.Newsgroup) *Actor
func (*ActivityPubServer) SendActivity ¶
func (aps *ActivityPubServer) SendActivity(targetInbox string, activity *Activity) error
type Actor ¶
type Actor struct {
Context []interface{} `json:"@context"`
ID string `json:"id"`
Type string `json:"type"`
PreferredUsername string `json:"preferredUsername"`
Name string `json:"name"`
Summary string `json:"summary"`
Inbox string `json:"inbox"`
Outbox string `json:"outbox"`
Followers string `json:"followers"`
Following string `json:"following"`
PublicKey PublicKey `json:"publicKey"`
}
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) BridgeArticle ¶
type Note ¶
type Note struct {
ID string `json:"id"`
Type string `json:"type"`
Summary string `json:"summary,omitempty"`
Content string `json:"content"`
Actor string `json:"actor"`
To []string `json:"to"`
CC []string `json:"cc,omitempty"`
Published time.Time `json:"published"`
Tag []Tag `json:"tag,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.