{"modulePath":"github.com/techcatslab/github-detector","version":"v0.0.0-20181008040219-160fd4699714","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst (\n\n\t// DefualtClientTag is used when the tag is \"\".\n\tDefualtClientTag = \"defualt\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrInvalidToken occurs when the token object is nil or token is \"\".\n\tErrInvalidToken = errors.New(\"invalid token\")\n)\n```\n\n## Functions\n\n```go\nfunc IsTokenValid(token *Token) error\n```\nIsTokenValid returns ErrInvalidToken if token is invalid.\n\n## Types\n\n```go\ntype Client struct {\n\t*github.Client\n\n\tTag string\n\t// contains filtered or unexported fields\n}\n```\nClient contains a available GitHub Client.\n\n```go\nfunc NewClient(token *Token) (*Client, error)\n```\nNewClient returns a Client.\n\n```go\nfunc (c *Client) List(owner, repo, path string) ([]*github.RepositoryContent, *github.Response, error)\n```\nList returns the contents of a file or directory in a repository.\n\n[https://developer.github.com/v3/repos/contents/#get-contents](https://developer.github.com/v3/repos/contents/#get-contents)\n\n```go\nfunc (c *Client) Search(language string, pushed time.Duration, min, max, page int) (*github.RepositoriesSearchResult, *github.Response, error)\n```\nSearch searches repositories via various criteria.\n\n[https://developer.github.com/v3/search/#search-repositories](https://developer.github.com/v3/search/#search-repositories) [https://help.github.com/articles/searching-repositories](https://help.github.com/articles/searching-repositories)\n\n```go\ntype Pool interface {\n\tGet(string) *Client\n\tPut(*Client)\n}\n```\nPool provides Get and Put function.\n\n```go\nfunc NewPool(tokens ...*Token) Pool\n```\nNewPool returns a GitHub Client Pool. It returns nil if there is no available Token.\n\n```go\ntype Token struct {\n\tTag   string `json:\"tag,omitempty\"`\n\tToken string `json:\"token\"`\n}\n```\nToken contains tag and github.\n\n","path":"github.com/techcatslab/github-detector/pkg/github","name":"github","synopsis":"","isRedistributable":true}
