Documentation
¶
Overview ¶
Package ghidcache caches GitHub identity reads - `gh auth status` and `gh api user` - that re-resolve on every coily invocation but are stable
Index ¶
Constants ¶
const TTL = 1 * time.Hour
TTL is the freshness window for cached identity responses. 1h matches stscache and sits at the high end of "stable for hours" - a token
Variables ¶
This section is empty.
Functions ¶
func APIUser ¶
APIUser returns the JSON body of `gh api user`, served from cache if a fresh entry exists for the active GH_HOST + token. On miss it invokes
func AuthStatus ¶
AuthStatus returns the captured output of `gh auth status` (stderr, since gh writes the human-readable host/scope readout there).
func Invalidate ¶
func Invalidate() error
Invalidate drops every cached identity entry under both subdirs. Callers that just rotated a token or switched GH_HOST can use this to
Types ¶
This section is empty.