Documentation ¶
Overview ¶
Github 辅助函数
Index ¶
- type GHClient
- func (p *GHClient) GetRepoInfo(ctx context.Context, userName, repoName string) (repo *github.Repository, err error)
- func (p *GHClient) GetRepoLanguages(repos []*github.Repository, max int) []string
- func (p *GHClient) GetRepoStargazers(ctx context.Context, userName, repoName string) (allStargazers []*github.Stargazer, err error)
- func (p *GHClient) GetRepositories(ctx context.Context, userName string) (allRepos []*github.Repository, err error)
- func (p *GHClient) GetStarredRepos(ctx context.Context, userName string) (allRepos []*github.StarredRepository, err error)
- func (p *GHClient) GetUserInfo(ctx context.Context, userName string) (user *github.User, err error)
- type GHOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GHClient ¶
type GHClient struct {
// contains filtered or unexported fields
}
Github 客户端
func NewGHClient ¶
func (*GHClient) GetRepoInfo ¶
func (p *GHClient) GetRepoInfo(ctx context.Context, userName, repoName string) (repo *github.Repository, err error)
获取仓库信息
func (*GHClient) GetRepoLanguages ¶
func (p *GHClient) GetRepoLanguages(repos []*github.Repository, max int) []string
获取仓库编程语言类型
func (*GHClient) GetRepoStargazers ¶
func (p *GHClient) GetRepoStargazers(ctx context.Context, userName, repoName string) (allStargazers []*github.Stargazer, err error)
获取仓库的关注信息
func (*GHClient) GetRepositories ¶
func (p *GHClient) GetRepositories(ctx context.Context, userName string) (allRepos []*github.Repository, err error)
获取用户的仓库列表
func (*GHClient) GetStarredRepos ¶
func (p *GHClient) GetStarredRepos(ctx context.Context, userName string) (allRepos []*github.StarredRepository, err error)
用户点赞仓库
Click to show internal directories.
Click to hide internal directories.