Documentation ¶
Index ¶
- Variables
- func CreateClientConnection() *github.Client
- func GetStarredRepos(user string) []string
- func GetToken() string
- func IsTokenSet()
- func IterateCustomRepos(DBName string)
- func IterateStarredRepos()
- func LatestRelease(user, project string)
- func LatestTag(user, project string) (string, error)
- func OpenDB(DBName string)
- func PrintFromConfig()
- func PrintStarredRepos()
- func RecentTags(user, project string)
- func UpdateCustomRepos(DBName string)
- func UpdateStarredRepos(DBName string)
- type Configuration
Constants ¶
This section is empty.
Variables ¶
var ( DBName = homedir + "/version.db" CustomBucket = "CustomProject" StarredBucket = "StarredProject" )
Bolt DB settings
var TOKEN = GetToken()
Global variable for setting a github token
Functions ¶
func CreateClientConnection ¶ added in v0.1.0
CreateClientConnection is a helper function for creating a connection to the Github API based on whether or not an auth token is supplied.
func GetStarredRepos ¶
GetStarredRepos returns an array of starred repos for a given user.
func GetToken ¶
func GetToken() string
GetToken is a helper function for determining if a Github auth token has been set.
func IsTokenSet ¶
func IsTokenSet()
IsTokenSet is a helper function that tells you if you have a github auth token set.
func IterateCustomRepos ¶
func IterateCustomRepos(DBName string)
IterateCustomRepos looks at what is in BoltDB and prints out the project and tag based on custom repo's that have been configured.
func IterateStarredRepos ¶
func IterateStarredRepos()
IterateStarredRepos looks at what is in BoltDB and prints out the project and tag.
func LatestRelease ¶
func LatestRelease(user, project string)
LatestRelease prints the latest release for a given user and project.
func LatestTag ¶
LatestTag returns the latest tag for a given user and project (VERSION WILL FAIL SILENTLY if rate limit has been exceeded).
func PrintFromConfig ¶
func PrintFromConfig()
PrintFromConfig tries to print versions based on repos that have been read in from a config file.
func PrintStarredRepos ¶
func PrintStarredRepos()
PrintStarredRepos tries to print tags of repos that have been starred according to the "user" configuration setting that is read from the config file.
func RecentTags ¶
func RecentTags(user, project string)
RecentTags print the last 10 releases for a single repo.
func UpdateCustomRepos ¶
func UpdateCustomRepos(DBName string)
UpdateCustomRepos reads in a configuration file, and writes projects and their tags to BoltDB.
func UpdateStarredRepos ¶
func UpdateStarredRepos(DBName string)
UpdateStarredRepos reads starred repo's for a user and writes projects and their tags to BoltDB.
Types ¶
type Configuration ¶
Configuration is a stuct used to read in repos and software projects from an external configuration file.
func ReadConfig ¶
func ReadConfig() *Configuration
ReadConfig is a helper function for reading in a configuration file.