Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheResult ¶
func CacheResult(org, team string, noOwner bool, repos []*github.Repository) error
cacheReposResult saves the repos result to cache
func CacheTeams ¶
CacheTeams stores team names to the cache file, one per line. The file is stored as <cache_dir>/<org>/teams
func GetTeamsCachePath ¶
GetTeamsCachePath returns the path to the teams cache file for an org.
func LoadCachedTeams ¶
LoadCachedTeams reads team names from the cache file. Returns nil, nil if the cache file doesn't exist.
Types ¶
type CachedRepo ¶
type ReposResult ¶
type ReposResult struct {
Org string `json:"org"`
Team string `json:"team,omitempty"`
NoOwner bool `json:"noOwner,omitempty"`
Repos []*CachedRepo `json:"repos"`
RunAt string `json:"runAt"`
CachePath string `json:"cachePath"`
}
ReposResult represents the cached result of a repos command run
func GetValidCache ¶
func GetValidCache(org, team string, noOwner bool) *ReposResult
getValidCache returns the cached result if it matches the parameters and is less than 15 minutes old
Click to show internal directories.
Click to hide internal directories.