Documentation
¶
Overview ¶
Package report constructs standardized in-memory achievement summaries combining official profile telemetry with calibrated counters.
Package report joins GitHub's official badge data with live counts into one report.
Index ¶
Constants ¶
const KindNew catalog.Kind = "new"
KindNew marks a badge on the profile that the catalog does not know yet.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HighlightRow ¶
HighlightRow is one profile highlight.
type Official ¶
type Official interface {
Profile(user string) (official.Profile, error)
Detail(user, slug string) (*official.Detail, error)
}
Official is where GitHub's own data comes from.
type Report ¶
type Report struct {
User string `json:"user"`
AchievementsHidden bool `json:"achievementsHidden"`
Authenticated bool `json:"authenticated"`
CatalogVerified string `json:"catalogVerified"`
Achievements []Row `json:"achievements"`
Highlights []HighlightRow `json:"highlights"`
}
Report is everything the CLI prints, and the --json output.
type Row ¶
type Row struct {
Slug string `json:"slug"`
Name string `json:"name"`
Kind catalog.Kind `json:"kind"`
HowToEarn string `json:"howToEarn"`
Tiers []int `json:"tiers"`
Status Status `json:"status"`
Tier int `json:"officialTier"` // GitHub's tier, 0 if not earned or hidden
Unlocked string `json:"unlocked,omitempty"`
Standing *progress.Standing `json:"standing,omitempty"`
Source progress.Source `json:"source,omitempty"`
Notes []string `json:"notes,omitempty"`
Official *official.Detail `json:"official,omitempty"`
Counter catalog.Counter `json:"counter"`
}
Row is one achievement in the report.