linstrom/ap/person.go

44 lines
4 KiB
Go
Raw Normal View History

2024-01-30 11:26:41 +00:00
package ap
import (
"net/url"
"time"
)
type Person struct {
Context map[string]any `json:"@context"` // Big chunk of hopefully don't give a fuck
ID url.URL `json:"id"` // URL to this resource
Type string `json:"type"` // Should always be of content "Person"
Following url.URL `json:"following"` // Ordered collection of accounts this account follows
Followers url.URL `json:"followers"` // Ordered collection of accounts following this account
Inbox url.URL `json:"inbox"` // Where others send activities to (posts, follow requests, reactions, etc)
Outbox url.URL `json:"outbox"` // Where others can read this account's activities from
Featured url.URL `json:"featured"` // Ordered collection of something featured - TODO: Find out what this is
FeaturedTags *url.URL `json:"featuredTags"` // Collection of something, not ordered - TODO: Find out what this is
PreferredUsername string `json:"preferredUsername"` // Username
Name string `json:"name"` // Vanity name
Summary string `json:"summary"` // Description of the account. Could contain html or maybe mfm for *key
Url url.URL `json:"url"` // Public location of the account
Locked bool `json:"manuallyApprovesFollowers"` // Does this account have to approve of follows before they are actual follows?
Discoverable bool `json:"discoverable"` // If this account can be found via search things? I guess?
Indexable *bool `json:"indexable"` // Probably if this account will be shown to search engines and crawlers?
Published *time.Time `json:"published"` // When this account was created I guess?
Memorial *bool `json:"memorial"` // If this account is closed? Or moved? Probably closed
Devices *url.URL `json:"devices"` // Collection of something - TODO: Find out what this is
PublicKey PublicKey `json:"publicKey"` // public key of that account. For verifying that that account is actually them
Tag []any `json:"tag"` // Array of something. Probably urls or strings
Attachment PersonInfoField `json:"attachment"` // Additional profile information (fields below the description, like "Source: https://gitlab.com/mstarongitlab/linstrom")
Endpoints map[string]string `json:"endpoints"` // Stores at least the shared inbox of the server this account is on in "sharedInbox", which is an url
Icon *Media `json:"icon"` // Profile image of the account
Image *Media `json:"image"` // Header image of the account
SharedInbox *url.URL `json:"sharedInbox"` // Replicates the shared inbox url here I guess
MkSummary *string `json:"_misskey_summary"` // Misskey's version of the summary
Background *url.URL `json:"backgroundUrl"` // Background image
IsCat *bool `json:"isCat"` // Is the user a cat (apply cat ears in that case)
NoIndex *bool `json:"noindex"` // probably the same as Indexable, just reversed?
SpeakAsCat *bool `json:"speakAsCat"` // Does the account speak like a cat
Birthday *string `json:"vcard:bday"` // Birthday date, but doesn't quite follow normalised datetime
Location *string `json:"vcard:Address"` // Where the user of the account lives, could technically be anything as just a string
}