Documentation ¶
Index ¶
- Constants
- Variables
- type Provider
- func (c Provider) GetReleases(name string, max int) (rs *results.ResultSet, s results.Status)
- func (c Provider) Latest(name string) (r *results.Result, s results.Status)
- func (c Provider) Match(query string) string
- func (c Provider) Name() string
- func (c Provider) Releases(name string) (rs *results.ResultSet, s results.Status)
- type RepoQuery
- type RepoQueryResult
Constants ¶
View Source
const GraphQLAPI = "https://api.github.com/graphql"
GraphQLAPI is the location of the GraphQL Endpoint
View Source
const RepoQueryFormat = `` /* 391-byte string literal not displayed */
RepoQueryFormat is the text format for the necessary GraphQL query
View Source
const (
// SourceFormat is the format string for Github release tarballs
SourceFormat = "https://github.com/%s/archive/%s.tar.gz"
)
Variables ¶
View Source
var SourceRegex = regexp.MustCompile("github.com/([^/]+/[^/.]+)")
SourceRegex is the regex for Github sources
View Source
var VersionRegex = regexp.MustCompile("(?:\\d+\\.)*\\d+\\w*")
VersionRegex is used to parse Github version numbers
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider is the upstream provider interface for github
func (Provider) GetReleases ¶ added in v1.1.0
GetReleases gets a number of releases for a given repo
type RepoQuery ¶ added in v1.1.0
type RepoQuery struct {
Query string `json:"query"`
}
RepoQuery is the JSON payload for this request
type RepoQueryResult ¶ added in v1.1.0
type RepoQueryResult struct { Data struct { Repository struct { Releases struct { Nodes []struct { Name string `json:"name"` PublishedAt string `json:"publishedAt"` IsPrerelease bool `json:"isPrerelease"` Tag struct { Name string `json:"name"` } `json:"tag"` } `json:"nodes"` } `json:"releases"` Refs struct { Nodes []struct { Name string `json:"name"` } `json:"nodes"` } `json:"refs"` } `json:"repository"` } `json:"data"` }
RepoQueryResult is the JSON payload of the response
Click to show internal directories.
Click to hide internal directories.