mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
2978 files. The fork is 2026-07-15 (rebrand: gitea.dev -> github.com/hanzoai/git), so 2026 is the year, and "Copyright 2026 Hanzo AI, Inc." was already the form used by the handful of files that had ours. Shape is now: // Copyright 2026 Hanzo AI, Inc. All rights reserved. // Copyright 2015 The Gogs Authors. All rights reserved. // Copyright 2019 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT Ours on top, theirs retained verbatim. Retained because MIT requires it, and separately because they are true — those authors did write that code. Not renamed to "The Git Authors": Git is a different project under a different license, and putting its name here would attribute this code to people who have nothing to do with it. Adding our line is the fix; overwriting theirs would have been both a licence violation and a false statement. gofmt still reports import-order drift in some of these files. It predates this change (verified against a stash) and is left alone rather than burying a one-line-per-file legal change under 3000 files of unrelated reordering. Build clean. Co-authored-by: Hanzo Dev <[email protected]>
64 lines
2.7 KiB
Go
64 lines
2.7 KiB
Go
// Copyright 2026 Hanzo AI, Inc. All rights reserved.
|
|
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package structs
|
|
|
|
// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
|
|
type NodeInfo struct {
|
|
// Version specifies the schema version
|
|
Version string `json:"version"`
|
|
// Software contains information about the server software
|
|
Software NodeInfoSoftware `json:"software"`
|
|
// Protocols lists the protocols supported by this server
|
|
Protocols []string `json:"protocols"`
|
|
// Services contains third party services this server can connect to
|
|
Services NodeInfoServices `json:"services"`
|
|
// OpenRegistrations indicates if new user registrations are accepted
|
|
OpenRegistrations bool `json:"openRegistrations"`
|
|
// Usage contains server usage statistics
|
|
Usage NodeInfoUsage `json:"usage"`
|
|
// Metadata contains free form key value pairs for software specific values
|
|
Metadata struct{} `json:"metadata"`
|
|
}
|
|
|
|
// NodeInfoSoftware contains Metadata about server software in use
|
|
type NodeInfoSoftware struct {
|
|
// Name is the canonical name of this server software
|
|
Name string `json:"name"`
|
|
// Version is the version of this server software
|
|
Version string `json:"version"`
|
|
// Repository is the URL to the source code repository
|
|
Repository string `json:"repository"`
|
|
// Homepage is the URL to the homepage of this server software
|
|
Homepage string `json:"homepage"`
|
|
}
|
|
|
|
// NodeInfoServices contains the third party sites this server can connect to via their application API
|
|
type NodeInfoServices struct {
|
|
// Inbound lists services that can deliver content to this server
|
|
Inbound []string `json:"inbound"`
|
|
// Outbound lists services this server can deliver content to
|
|
Outbound []string `json:"outbound"`
|
|
}
|
|
|
|
// NodeInfoUsage contains usage statistics for this server
|
|
type NodeInfoUsage struct {
|
|
// Users contains user statistics
|
|
Users NodeInfoUsageUsers `json:"users"`
|
|
// LocalPosts is the total amount of posts made by users local to this server
|
|
LocalPosts int `json:"localPosts,omitempty"`
|
|
// LocalComments is the total amount of comments made by users local to this server
|
|
LocalComments int `json:"localComments,omitempty"`
|
|
}
|
|
|
|
// NodeInfoUsageUsers contains statistics about the users of this server
|
|
type NodeInfoUsageUsers struct {
|
|
// Total is the total amount of users on this server
|
|
Total int `json:"total,omitempty"`
|
|
// ActiveHalfyear is the amount of users that signed in at least once in the last 180 days
|
|
ActiveHalfyear int `json:"activeHalfyear,omitempty"`
|
|
// ActiveMonth is the amount of users that signed in at least once in the last 30 days
|
|
ActiveMonth int `json:"activeMonth,omitempty"`
|
|
}
|