Documentation ¶
Index ¶
- type Client
- type GitHubClient
- func (g *GitHubClient) GetIssue(res *Result, issue string) error
- func (g *GitHubClient) GetIssues(res *Result, query string) error
- func (g *GitHubClient) GetProject(res *Result, query string) error
- func (g *GitHubClient) GetProjects(res *Result, query string) error
- func (g *GitHubClient) GetRepo(res *Result, repo string) error
- type Handler
- type Issue
- type Project
- type Repo
- type Result
- type SocketClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
GitHubClient wraps a githubv4 graphql client connection
func NewGitHubClient ¶
func NewGitHubClient(cfg config.Config) *GitHubClient
NewGitHubClient returns a GitHub graphqlv4 client wrapper from a config
func (*GitHubClient) GetIssue ¶
func (g *GitHubClient) GetIssue(res *Result, issue string) error
GetIssue retrieves an issue's information
func (*GitHubClient) GetIssues ¶
func (g *GitHubClient) GetIssues(res *Result, query string) error
GetIssues retrieves issues from the search API given a query
func (*GitHubClient) GetProject ¶
func (g *GitHubClient) GetProject(res *Result, query string) error
GetProject retrieves a project for either an org or a repo
func (*GitHubClient) GetProjects ¶
func (g *GitHubClient) GetProjects(res *Result, query string) error
GetProjects retrieves a list of projects
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a set of RPC http handlers
func NewHandler ¶
NewHandler creates a new RPC handler with the given config
type Issue ¶
type Issue struct { Type string `json:"type"` State string `json:"state"` Title string `json:"description"` Repo string `json:"repo"` Number string `json:"number"` }
Issue is an issue in a RPC result
type Project ¶
type Project struct { Number int `json:"number"` URL string `json:"url"` Name string `json:"name"` State string `json:"state"` }
Project is a project in an RPC result
type Repo ¶
type Repo struct {
Description string `json:"description"`
}
Repo is a respository in an RPC result
type Result ¶
type Result struct { Complete bool `json:"complete"` // is the request finished? Error string `json:"error"` // server error, if applicable Repos []Repo `json:"repos"` Issues []Issue `json:"issues"` Projects []Project `json:"projects"` }
Result is the result of an RPC call
type SocketClient ¶
type SocketClient struct {
// contains filtered or unexported fields
}
SocketClient is a client that talks to a local socket
func NewClient ¶
func NewClient(socketPath string) SocketClient
NewClient creates a new Client from a config
func (SocketClient) Query ¶
func (sc SocketClient) Query(endpoint, query string) Result
Query executes a query against the RPC server.
Returns a Result if the RPC call completed successfully, regardless of whether the ultimate value is ready or not.