package main import ( "crypto/rsa" "time" ) type appDef struct { Name string WebhookURL string PublicKey *rsa.PublicKey } var apps map[string]appDef type profileLink struct { Rel string `json:"rel"` Type string `json:"type"` Href string `json:"href"` } type profileWebFingerData struct { Subject string `json:"subject"` Links []profileLink `json:"links"` } type pubKeyBlock struct { ID string `json:"id"` Owner string `json:"owner"` PEM string `json:"publicKeyPem"` } type profilePage struct { Context []string `json:"@context"` ID string `json:"id"` Type string `json:"type"` PreferredUsername string `json:"preferredUsername"` Name string `json:"name"` Inbox string `json:"inbox"` Followers string `json:"followers"` PublicKey *pubKeyBlock `json:"publicKey,omitempty"` } type inboxPush struct { Actor string `json:"actor"` CC []string `json:"cc"` ID string `json:"id"` Object interface{} `json:"object"` To []string `json:"to"` Type string `json:"type"` Context string `json:"context,omitempty"` Published time.Time `json:"published,omitempty"` } type inboxCreatePayload struct { Actor string `json:"actor"` AttributedTo string `json:"attributedTo"` CC []string `json:"cc"` Content string `json:"content"` Context string `json:"context"` Conversation string `json:"conversation"` ID string `json:"id"` Published time.Time `json:"published"` Sensitive bool `json:"sensitive"` Source string `json:"source"` Tag []tag `json:"tag"` To []string `json:"to"` Type string `json:"Type"` } type tag struct { Href string `json:"href"` Name string `json:"name"` Type string `json:"type"` }