From db51ec15fceda62f701cf8c7b4d734939b14b62a Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 8 Aug 2018 18:10:59 -0400 Subject: [PATCH] Add `software` property to metadata --- nodeinfo.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nodeinfo.go b/nodeinfo.go index 548b1c6..46979f3 100644 --- a/nodeinfo.go +++ b/nodeinfo.go @@ -49,9 +49,10 @@ type ( // From the spec: Free form key value pairs for software specific values. // Clients should not rely on any specific key present. Metadata struct { - NodeName string `json:"nodeName,omitempty"` - NodeDescription string `json:"nodeDescription,omitempty"` - Private bool `json:"private,omitempty"` + NodeName string `json:"nodeName,omitempty"` + NodeDescription string `json:"nodeDescription,omitempty"` + Private bool `json:"private,omitempty"` + Software SoftwareMeta `json:"software,omitempty"` } Services struct { @@ -66,6 +67,12 @@ type ( Version string `json:"version"` } + SoftwareMeta struct { + HomePage string `json:"homepage"` + GitHub string `json:"github"` + Follow string `json:"follow"` + } + // Usage is usage statistics for this server. Usage struct { Users UsageUsers `json:"users"`