Documentation ¶
Index ¶
- func GetUser(g Client, log logrus.Entry, timeout time.Duration, userName string) (github.User, error)
- func ListComments(g Client, timeout time.Duration, user string, repoName string, ...) ([]*github.IssueComment, error)
- func ListIssues(g Client, timeout time.Duration, user string, repoName string, since time.Time) ([]models.ExtendedGithubIssue, error)
- type Client
- type TestGHClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUser ¶
func GetUser(g Client, log logrus.Entry, timeout time.Duration, userName string) (github.User, error)
GetUser returns a GitHub user from its login.
Types ¶
type Client ¶
type Client interface {
// contains filtered or unexported methods
}
Client is a wrapper around the GitHub API Client library we use. It allows us to swap in other implementations, such as a dry run clients, or mock clients for testing.
func NewClient ¶
NewClient creates a Client and returns it; which implementation it uses depends on the configuration of this run. For example, a dry-run clients may be created which does not make any requests that would change anything on the server, but instead simply prints out the actions that it's asked to take.
type TestGHClient ¶
type TestGHClient struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
func NewTestClient() TestGHClient
Click to show internal directories.
Click to hide internal directories.