Documentation ¶
Index ¶
Constants ¶
View Source
const ( ZipUrlPattern = "https://api.github.com/repos/%s/%s/zipball/%s" //nolint:stylecheck TagsUrlPattern = "https://api.github.com/repos/%s/%s/releases" //nolint:stylecheck LatestTagUrlPattern = "https://api.github.com/repos/%s/%s/releases/latest" //nolint:stylecheck RitchieRepoURL = "https://github.com/ZupIT/ritchie-cli" )
Variables ¶
This section is empty.
Functions ¶
func NewRepoInfo ¶
NewRepoInfo returns the RepoInfo built by repository url Repository url e.g. https://github.com/{{owner}}/{{repo}}
Types ¶
type DefaultRepoInfo ¶
type DefaultRepoInfo struct {
// contains filtered or unexported fields
}
func (DefaultRepoInfo) LatestTagUrl ¶
func (in DefaultRepoInfo) LatestTagUrl() string
LatestTagUrl returns the GitHub API URL for get latest tag release https://api.github.com/repos/:owner/:repo/releases/latest
func (DefaultRepoInfo) TagsUrl ¶
func (in DefaultRepoInfo) TagsUrl() string
TagsUrl returns the GitHub API URL for get all tags e.g. https://api.github.com/repos/{{owner}}/{{repo}}/tags
func (DefaultRepoInfo) Token ¶
func (in DefaultRepoInfo) Token() string
func (DefaultRepoInfo) TokenHeader ¶
func (in DefaultRepoInfo) TokenHeader() string
TokenHeader returns the Authorization value formatted for Github API integration e.g. "token some_token"
func (DefaultRepoInfo) ZipUrl ¶
func (in DefaultRepoInfo) ZipUrl(version string) string
ZipUrl returns the GitHub API URL for download zipball repository e.g. https://api.github.com/repos/{{owner}}/{{repo}}/zipball/{{tag-version}}
type RepoManager ¶
type RepoManager struct {
// contains filtered or unexported fields
}
func NewRepoManager ¶
func NewRepoManager(client *http.Client) RepoManager
func (RepoManager) Zipball ¶
func (re RepoManager) Zipball(info git.RepoInfo, version string) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.