Documentation ¶
Index ¶
Constants ¶
View Source
const (
ProtocolMatrix = "matrix"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Software Software `json:"software"` Version string `json:"version"` OpenRegistrations bool `json:"openRegistrations"` Protocols []string `json:"protocols"` Services Services `json:"services"` Usage Usage `json:"usage"` Metadata map[string]interface{} `json:"metadata"` }
Node metadata about a server running in the federation
type QueryNodeOption ¶
type QueryNodeOption func(f *fetcher) error
QueryNodeOption are functions to be used as options for QueryNode
func QueryOptionClient ¶
func QueryOptionClient(c *http.Client) QueryNodeOption
QueryOptionClient return an option for QueryNode that can set an specific http client
func QueryOptionNoMatrix ¶ added in v0.1.0
func QueryOptionNoMatrix() QueryNodeOption
QueryOptionNoMatrix do not discovery based on the matrix specification
func QueryOptionNoNodeinfo ¶ added in v0.1.0
func QueryOptionNoNodeinfo() QueryNodeOption
QueryOptionNoNodeinfo do not discovery based on the nodeinfo2 specification
type Software ¶
type Software struct { Name string `json:"name"` Version string `json:"version"` Repository string `json:"repository"` Homepage string `json:"homepage"` }
Software is about node software
type Usage ¶
type Usage struct { Users UsersUsage `json:"users"` LocalPosts int `json:"localPosts,omitempty"` LocalComments int `json:"localComments,omitempty"` }
Usage are usage statistics for the node
type UsersUsage ¶
type UsersUsage struct { Total int `json:"total,omitempty"` ActiveHalfyear int `json:"activeHalfyear,omitempty"` ActiveMonth int `json:"activeMonth,omitempty"` }
UsersUsage are statistics about the users of the node
Click to show internal directories.
Click to hide internal directories.