Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoToken = errors.New("github: no token available") ErrTokenReachLimit = errors.New("github: token reaches the limit") ErrTokenUsing = errors.New("github: token is using") )
View Source
var (
DefaultHost = pkgdata.GithubHost
)
Github settings.
View Source
var (
ErrNotSupport = errors.New("github: repo not support")
)
Errors.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetRepository ¶
func (c *Client) GetRepository(owner, repo string) (*RepositoryResponse, error)
type CountResponse ¶
type CountResponse struct {
TotalCount int64 `json:"totalCount"`
}
type FundingLinkResponse ¶
type LicenseInfo ¶
type PrimaryLanguage ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProviderWithTokens ¶
func NewProviderWithTokens(tokens *TokenStore) (*Provider, error)
func (*Provider) ProviderName ¶
type RepositoryResponse ¶
type RepositoryResponse struct { ForkCount int64 `json:"forkCount"` HomepageUrl string `json:"homepageUrl"` IsArchived bool `json:"isArchived"` IsDisabled bool `json:"isDisabled"` IsMirror bool `json:"isMirror"` UpdatedAt string `json:"updatedAt"` Stargazers *CountResponse `json:"stargazers"` Watchers *CountResponse `json:"watchers"` Issues *CountResponse `json:"issues"` PullRequests *CountResponse `json:"pullRequests"` PrimaryLanguage *PrimaryLanguage `json:"primaryLanguage"` LicenseInfo *LicenseInfo `json:"licenseInfo"` FundingLinks []*FundingLinkResponse `json:"fundingLinks"` }
type TokenInfo ¶
func NewTokenInfo ¶
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func NewTokenStore ¶
func NewTokenStore(tokens []string) *TokenStore
func (*TokenStore) Add ¶
func (t *TokenStore) Add(tokens []string)
func (*TokenStore) Get ¶
func (t *TokenStore) Get() (*TokenInfo, error)
func (*TokenStore) Set ¶
func (t *TokenStore) Set(tokens []string)
Click to show internal directories.
Click to hide internal directories.