Documentation ¶
Index ¶
- Variables
- type Package
- type Spider
- func (s *Spider) ReadPackage(ctx context.Context, user, repo, path string) (*Package, []*gpb.FolderInfo, error)
- func (s *Spider) ReadRepo(ctx context.Context, user, repo, sha string, ...) error
- func (s *Spider) ReadRepository(ctx context.Context, user, name string) (*gpb.RepoInfo, error)
- func (s *Spider) ReadUser(ctx context.Context, name string) (*User, error)
- func (s *Spider) RepoBranchSHA(ctx context.Context, owner, repo, branch string) (sha string, err error)
- func (s *Spider) SearchRepositories(ctx context.Context, 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 ¶
func (s *Spider) ReadPackage(ctx context.Context, user, repo, path string) (*Package, []*gpb.FolderInfo, error)
Even an error is returned, the folders may still contain useful elements.
func (*Spider) ReadRepo ¶
func (s *Spider) ReadRepo(ctx context.Context, user, repo, sha string, f func(path string, pkg *gpb.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 ¶
Click to show internal directories.
Click to hide internal directories.