Versions in this module Expand all Collapse all v0 v0.1.0 Mar 12, 2023 Changes in this version + const ContextActivityStreams + const ContextMastodon + const ContextSecurity + const HostMetaWebFingerTemplateRel + const NodeInfo20Schema + const NodeInfo21Schema + var ErrInvalidAccountFormat = NewError("invalid account format") + var ErrMissingNodeInfoURI = NewError("missing node info url") + func SplitAccount(act string) (username string, domain string, err error) + type Activity map[string]interface + func (a Activity) Actor() (string, error) + func (a Activity) ID() (string, error) + func (a Activity) ObjectID() (string, error) + func (a Activity) ObjectType() (ActivityType, error) + func (a Activity) Type() (ActivityType, error) + type ActivityType string + const TypeAccept + const TypeAdd + const TypeAnnounce + const TypeCreate + const TypeDelete + const TypeFollow + const TypeMove + const TypeOrderedCollection + const TypeOrderedCollectionPage + const TypeRemove + const TypeUndo + const TypeUpdate + func (a ActivityType) String() string + type Actor struct + Attachment []Attachment + Context interface{} + Device string + Discoverable bool + Endpoints *Endpoints + Featured string + FeaturedTags string + Followers string + Following string + ID string + Icon *Media + Image *Media + Inbox string + ManuallyApprovesFollowers bool + Name string + Outbox string + PreferredUsername string + PublicKey *PublicKey + Published *time.Time + Summary string + Tags []Tag + Type ActorType + URL string + func FetchActor(ctx context.Context, t *http.Client, actorURL string) (*Actor, error) + func (a *Actor) ParsePublicKey() (crypto.PublicKey, error) + type ActorType string + const TypeApplication + const TypePerson + const TypeService + func (a ActorType) String() string + type Attachment struct + Name string + Type string + Value string + type Endpoints struct + SharedInbox string + type Error struct + func NewError(m string) *Error + func NewErrorf(m string, args ...interface{}) *Error + func (e *Error) Error() string + type HostMeta struct + Links []Link + XMLNS string + func FetchHostMeta(ctx context.Context, t *http.Client, domain string, config ...bool) (*HostMeta, error) + func (h *HostMeta) WebFingerURI() WebFingerURI + type Link struct + Href string + Rel string + Template string + Type string + type Media struct + MediaType string + Type string + URL string + type NodeInfo struct + Metadata interface{} + OpenRegistrations bool + Protocols []string + Services NodeInfoServices + Software NodeInfoSoftware + Usage NodeInfoUsage + Version string + func FetchNodeInfo(ctx context.Context, t *http.Client, infoURI *url.URL) (*NodeInfo, error) + func FetchNodeInfoForDomain(ctx context.Context, t *http.Client, domain string, config ...bool) (*NodeInfo, error) + type NodeInfoServices struct + Inbound []string + Outbound []string + type NodeInfoSoftware struct + Name string + Version string + type NodeInfoUsage struct + LocalPosts int64 + Users NodeInfoUsageUsers + type NodeInfoUsageUsers struct + Total int64 + type PublicKey struct + ID string + Owner string + PublicKeyPEM string + type Software string + const SoftwareHometown + const SoftwareMastodon + const SoftwarePleroma + func (s Software) String() string + type Tag struct + HRef string + ID string + Icon *Media + Name string + Type string + Updated time.Time + type WebFinger struct + Aliases []string + Links []Link + Subject string + func FetchWebFinger(ctx context.Context, t *http.Client, username, domain string, ...) (*WebFinger, error) + func (w *WebFinger) ActorURI() (*url.URL, error) + type WebFingerURI string + func (w WebFingerURI) FTemplate() string + func (w WebFingerURI) String() string + type WellKnownNodeInfo struct + Links []Link + func FetchWellKnownNodeInfo(ctx context.Context, t *http.Client, domain string, config ...bool) (*WellKnownNodeInfo, error) + func (w *WellKnownNodeInfo) NodeInfoURI() (*url.URL, error)