Documentation
¶
Index ¶
Constants ¶
View Source
const (
ProtocolMatrix = "matrix"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterExtension ¶ added in v0.3.0
func RegisterExtension(e Extension)
func RegisterGenericExtension ¶ added in v0.3.0
func RegisterGenericExtension(e Extension)
Types ¶
type Fetcher ¶ added in v0.2.1
func NewFetcher ¶ added in v0.2.1
func NewFetcher(opts ...QueryNodeOption) (Fetcher, error)
type Instance ¶ added in v0.3.2
type Instance struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
Instance contain metadata specific to the instance
type Node ¶
type Node struct {
Version string `json:"version"`
Instance Instance `json:"instance"`
Software Software `json:"software"`
Protocols []string `json:"protocols"`
Services Services `json:"services"`
OpenRegistrations bool `json:"openRegistrations"`
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 int64 `json:"localPosts,omitempty"`
LocalComments int64 `json:"localComments,omitempty"`
}
Usage are usage statistics for the node
Click to show internal directories.
Click to hide internal directories.