docs: add doc.go files and godoc comments to all packages

Add package-level documentation (doc.go) to all 22 first-party
packages and godoc comments to ~150 previously undocumented
exported symbols across common/, network/, and server/.
This commit is contained in:
Houmgaor
2026-02-18 21:39:13 +01:00
parent b9cb274ced
commit 2bd5f98f32
81 changed files with 342 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import (
"go.uber.org/zap"
)
// GuildMember represents a guild member with role and stats.
type GuildMember struct {
GuildID uint32 `db:"guild_id"`
CharID uint32 `db:"character_id"`
@@ -92,6 +93,7 @@ SELECT
LEFT JOIN guilds g ON g.id = gc.guild_id
`
// GetGuildMembers loads all members of a guild.
func GetGuildMembers(s *Session, guildID uint32, applicants bool) ([]*GuildMember, error) {
rows, err := s.server.db.Queryx(fmt.Sprintf(`
%s
@@ -120,6 +122,7 @@ func GetGuildMembers(s *Session, guildID uint32, applicants bool) ([]*GuildMembe
return members, nil
}
// GetCharacterGuildData loads a character's guild membership.
func GetCharacterGuildData(s *Session, charID uint32) (*GuildMember, error) {
rows, err := s.server.db.Queryx(fmt.Sprintf("%s WHERE character.character_id=$1", guildMembersSelectSQL), charID)