Documentation
¶
Index ¶
- Variables
- type Package
- type Spider
- func (s *Spider) ReadPackage(user, repo, path string) (*Package, []*sppb.FolderInfo, error)
- func (s *Spider) ReadRepo(user, repo, sha string, f func(path string, pkg *sppb.Package) error) error
- func (s *Spider) ReadRepository(user, name string) (*sppb.RepoInfo, error)
- func (s *Spider) ReadUser(name string) (*User, error)
- func (s *Spider) RepoBranchSHA(owner, repo, branch string) (sha string, err error)
- func (s *Spider) SearchRepositories(q string) ([]github.Repository, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPackage = errors.New("the package is not a Go package")
View Source
var ErrInvalidRepository = errors.New("the repository is not found")
View Source
var ErrRateLimited = errors.New("Github rate limited")
Functions ¶
This section is empty.
Types ¶
type Spider ¶
func NewSpiderWithContents ¶
func NewSpiderWithToken ¶
func (*Spider) ReadPackage ¶
Even an error is returned, the folders may still contain useful elements.
func (*Spider) ReadRepo ¶
func (s *Spider) ReadRepo(user, repo, sha string, f func(path string, pkg *sppb.Package) error) error
ReadRepo reads all packages of a repository. For pkg given to f, it will not be reused. path in f is relative to the repository path.
func (*Spider) ReadRepository ¶
func (*Spider) RepoBranchSHA ¶
func (*Spider) SearchRepositories ¶
func (s *Spider) SearchRepositories(q string) ([]github.Repository, error)
Click to show internal directories.
Click to hide internal directories.