Documentation
¶
Index ¶
- Constants
- Variables
- func BuildQuery(query string) (string, error)
- func GenerateSearchCodeTask() (map[int][]models.Rule, error)
- func GetGithubUserInfo(client *Client, ownerName *string) *github.User
- func InitGithubClients() (map[string]*Client, error)
- func InsertAllRepos()
- func PassFilters(codeResult *models.CodeResult, fullName string) bool
- func RunSearchTask(mapRules map[int][]models.Rule, err error)
- func SaveResult(results []*github.CodeSearchResult, err error, keyword *string)
- func ScheduleTasks(duration time.Duration)
- func Search(rules []models.Rule)
- type Client
- func (c *Client) GetOrgsMembers(org string) ([]*github.User, *github.Response, error)
- func (c *Client) GetOrgsRepos(org string) ([]*github.Repository, *github.Response, error)
- func (c *Client) GetStrUsersRepos(users []string) map[string][]*github.Repository
- func (c *Client) GetUserInfo(username string) (*github.User, *github.Response, error)
- func (c *Client) GetUserOrgs(username string) ([]*github.Organization, *github.Response, error)
- func (c *Client) GetUserRepos(username string) ([]*github.Repository, *github.Response, error)
- func (c *Client) GetUsersRepos(users []*github.User) map[string][]*github.Repository
- func (c *Client) SearchCode(keyword string) ([]*github.CodeSearchResult, error)
Constants ¶
View Source
const ( CONST_REPO = "repo" CONST_REPOS = "repos" CONST_ORGS = "organizations" CONST_USER = "user" )
Variables ¶
View Source
var (
SEARCH_NUM = 25
)
Functions ¶
func BuildQuery ¶
func InitGithubClients ¶
func InsertAllRepos ¶
func InsertAllRepos()
func PassFilters ¶
func PassFilters(codeResult *models.CodeResult, fullName string) bool
The filters are utilized to filter the codeResult
func SaveResult ¶
func SaveResult(results []*github.CodeSearchResult, err error, keyword *string)
func ScheduleTasks ¶
Types ¶
type Client ¶
func GetGithubClient ¶
func (*Client) GetOrgsMembers ¶
func (*Client) GetOrgsRepos ¶
func (*Client) GetStrUsersRepos ¶
func (c *Client) GetStrUsersRepos(users []string) map[string][]*github.Repository
func (*Client) GetUserInfo ¶
func (*Client) GetUserOrgs ¶
func (*Client) GetUserRepos ¶
func (*Client) GetUsersRepos ¶
func (*Client) SearchCode ¶
func (c *Client) SearchCode(keyword string) ([]*github.CodeSearchResult, error)
Click to show internal directories.
Click to hide internal directories.