Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Protocols that can be supported by this node. ProtocolActivityPub NodeProtocol = "activitypub" ProtocolBuddyCloud = "buddycloud" ProtocolDFRN = "dfrn" ProtocolDisaspora = "diaspora" ProtocolLibertree = "libertree" ProtocolOStatus = "ostatus" ProtocolPumpIO = "pumpio" ProtocolTent = "tent" ProtocolXMPP = "xmpp" ProtocolZot = "zot" // Services that can be supported (inbound or outbound) by this node's API. ServiceAtom NodeService = "atom1.0" ServiceGNUSocial = "gnusocial" ServiceIMAP = "imap" ServicePnut = "pnut" ServicePOP3 = "pop3" ServicePumpIO = "pumpio" ServiceRSS = "rss2.0" ServiceTwitter = "twitter" ServiceTumblr = "tumblr" )
View Source
const NodeInfoPath = "/.well-known/nodeinfo"
NodeInfoPath defines the default path of the nodeinfo handler.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BaseURL string InfoURL string Metadata Metadata Protocols []NodeProtocol Services Services Software SoftwareInfo }
type Metadata ¶
type Metadata struct { NodeName string `json:"nodeName,omitempty"` NodeDescription string `json:"nodeDescription,omitempty"` Private bool `json:"private,omitempty"` Software SoftwareMeta `json:"software,omitempty"` }
Metadata for nodeinfo. Properties are based on what Pleroma uses.
From the spec: Free form key value pairs for software specific values. Clients should not rely on any specific key present.
type NodeInfo ¶
type NodeInfo struct { Metadata Metadata `json:"metadata"` OpenRegistrations bool `json:"openRegistrations"` Protocols []NodeProtocol `json:"protocols"` Services Services `json:"services"` Software SoftwareInfo `json:"software"` Usage Usage `json:"usage"` Version string `json:"version"` }
NodeInfo includes all required node info.
type NodeProtocol ¶
type NodeProtocol string
type NodeService ¶
type NodeService string
type Service ¶
func NewService ¶
func (*Service) NodeInfoDiscover ¶
func (s *Service) NodeInfoDiscover(w http.ResponseWriter, r *http.Request)
type Services ¶
type Services struct { Inbound []NodeService `json:"inbound"` Outbound []NodeService `json:"outbound"` }
type SoftwareInfo ¶
type SoftwareMeta ¶
type Usage ¶
type Usage struct { Users UsageUsers `json:"users"` LocalPosts int `json:"localPosts,omitempty"` LocalComments int `json:"localComments,omitempty"` }
Usage is usage statistics for this server.
type UsageUsers ¶
Click to show internal directories.
Click to hide internal directories.