Add current nodeinfo 2.2 draft

This commit is contained in:
Melody Becker 2025-06-11 09:14:49 +02:00
parent f727b30f32
commit e30cb6746a
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
3 changed files with 81 additions and 0 deletions

View file

@ -26,6 +26,7 @@ type NodeInfo2UsageUsers struct {
Total uint `json:"total"`
ActiveHalfYear *uint `json:"active_half_year"`
ActiveMonth *uint `json:"active_month"`
ActiveWeek *uint `json:"active_week,omitempty"`
}
type NodeInfo2Usage struct {
@ -34,8 +35,14 @@ type NodeInfo2Usage struct {
LocalComments uint `json:"local_comments"`
}
type NodeInfo2Instance struct {
Name string `json:"name"`
Description string `json:"description"`
}
type NodeInfo2 struct {
Version string `json:"version"`
Instance *NodeInfo2Instance `json:"instance,omitempty"`
Software NodeInfo2Software `json:"software"`
Protocols []string `json:"protocols"`
Services map[string][]string `json:"services"`