Documentation ¶
Index ¶
- Constants
- Variables
- func Init()
- type ActivityPub
- func (ap *ActivityPub) DetectServerSoftware() (server ServerSoftware, err error)
- func (ap *ActivityPub) ExtractSignature() (err error)
- func (ap *ActivityPub) GeneratePostPayload() (_ map[string]string)
- func (ap *ActivityPub) GenerateSignPayload() (payload string)
- func (ap *ActivityPub) GetMastodonText() (err error)
- func (ap *ActivityPub) GetMisskeyText() (err error)
- func (ap *ActivityPub) SplitID() (username, server string, err error)
- func (ap *ActivityPub) Validate() (err error)
- type MastodonResponse
- type MastodonResponseAccount
- type NodeInfo
- type NodeInfoLink
- type ServerSoftware
Constants ¶
View Source
const ( POST_TEMPLATE = "" /* 179-byte string literal not displayed */ MATCH_TEMPLATE = "^Signature: (.*)$" )
View Source
const MASTODON_API_STATUS = "https://%s/api/v1/statuses/%s"
Variables ¶
View Source
var ( Servers = struct { Mastodon ServerSoftware Misskey ServerSoftware Pleroma ServerSoftware }{ Mastodon: "mastodon", Misskey: "misskey", Pleroma: "pleroma", } )
Functions ¶
Types ¶
type ActivityPub ¶
func (*ActivityPub) DetectServerSoftware ¶
func (ap *ActivityPub) DetectServerSoftware() (server ServerSoftware, err error)
func (*ActivityPub) ExtractSignature ¶
func (ap *ActivityPub) ExtractSignature() (err error)
func (*ActivityPub) GeneratePostPayload ¶
func (ap *ActivityPub) GeneratePostPayload() (_ map[string]string)
func (*ActivityPub) GenerateSignPayload ¶
func (ap *ActivityPub) GenerateSignPayload() (payload string)
func (*ActivityPub) GetMastodonText ¶
func (ap *ActivityPub) GetMastodonText() (err error)
GetMastodonText can also deal with Pleroma server.
func (*ActivityPub) GetMisskeyText ¶
func (ap *ActivityPub) GetMisskeyText() (err error)
func (*ActivityPub) SplitID ¶
func (ap *ActivityPub) SplitID() (username, server string, err error)
func (*ActivityPub) Validate ¶
func (ap *ActivityPub) Validate() (err error)
type MastodonResponse ¶
type MastodonResponse struct { Account MastodonResponseAccount `json:"account"` Content string `json:"content"` }
type MastodonResponseAccount ¶
type NodeInfo ¶
type NodeInfo struct {
Links []NodeInfoLink `json:"links"`
}
type NodeInfoLink ¶
type ServerSoftware ¶
type ServerSoftware string
Click to show internal directories.
Click to hide internal directories.