Documentation
¶
Overview ¶
Package github implements the GitHub read backend using go-gh API clients.
Index ¶
- type Client
- func (c *Client) AddAssignees(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)
- func (c *Client) AddComment(ctx context.Context, id domain.NodeID, body string) (domain.CommentResult, error)
- func (c *Client) AddLabels(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)
- func (c *Client) AddProjectItem(ctx context.Context, projectID, issueID domain.NodeID) (domain.Placement, error)
- func (c *Client) ChangeToken(ctx context.Context, ref domain.RepoRef, project domain.NodeID) (domain.ChangeToken, error)
- func (c *Client) ClearProjectStatus(ctx context.Context, projectID, itemID, fieldID domain.NodeID) error
- func (c *Client) CloseIssue(ctx context.Context, id domain.NodeID, reason string) (domain.Issue, error)
- func (c *Client) CreateIssue(ctx context.Context, in domain.CreateInput) (domain.Issue, error)
- func (c *Client) CredentialKey(ctx context.Context) (string, error)
- func (c *Client) Credentials(ctx context.Context) (domain.CredentialInfo, error)
- func (c *Client) DeleteIssue(ctx context.Context, id domain.NodeID) error
- func (c *Client) DoctorScopes(ctx context.Context) (domain.CredentialInfo, error)
- func (c *Client) Issue(ctx context.Context, ref domain.RepoRef, n int, selected domain.NodeID) (domain.IssueDetail, error)
- func (c *Client) IssueComments(ctx context.Context, r domain.RepoRef, n int, p domain.PageRequest) (domain.Page[domain.Comment], error)
- func (c *Client) IssuePlacements(ctx context.Context, id domain.NodeID) ([]domain.ProjectItem, error)
- func (c *Client) LinkedProjects(ctx context.Context, r domain.RepoRef, p domain.PageRequest) (domain.Page[domain.Project], error)
- func (c *Client) ListAssignableUsers(ctx context.Context, ref domain.RepoRef, p domain.PageRequest) (domain.Page[domain.User], error)
- func (c *Client) ListIssues(ctx context.Context, ref domain.RepoRef, filter domain.IssueFilter, ...) (domain.Page[domain.Issue], error)
- func (c *Client) ListLabels(ctx context.Context, ref domain.RepoRef, p domain.PageRequest) (domain.Page[domain.Label], error)
- func (c *Client) ListPRs(ctx context.Context, ref domain.RepoRef, f domain.PRFilter, ...) (domain.Page[domain.PullRequest], error)
- func (c *Client) OwnerProjects(ctx context.Context, owner string, p domain.PageRequest) (domain.Page[domain.Project], error)
- func (c *Client) PR(ctx context.Context, ref domain.RepoRef, n int) (domain.PRDetail, error)
- func (c *Client) PRComments(ctx context.Context, r domain.RepoRef, n int, p domain.PageRequest) (domain.Page[domain.Comment], error)
- func (c *Client) Project(ctx context.Context, r domain.ProjectRef) (domain.Project, error)
- func (c *Client) ProjectFields(ctx context.Context, id domain.NodeID) (domain.BoardInfo, error)
- func (c *Client) ProjectItems(ctx context.Context, id domain.NodeID, p domain.PageRequest) (domain.Page[domain.ProjectItem], error)
- func (c *Client) RateLimit() domain.RateLimit
- func (c *Client) RefreshCredentials(ctx context.Context) error
- func (c *Client) RemoveAssignees(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)
- func (c *Client) RemoveLabels(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)
- func (c *Client) RemoveProjectItem(ctx context.Context, projectID, itemID domain.NodeID) error
- func (c *Client) ReopenIssue(ctx context.Context, id domain.NodeID) (domain.Issue, error)
- func (c *Client) Repository(ctx context.Context, ref domain.RepoRef) (domain.Repository, error)
- func (c *Client) SetProjectStatus(ctx context.Context, projectID, itemID, fieldID domain.NodeID, optionID string) error
- func (c *Client) UnarchiveProjectItem(ctx context.Context, projectID, itemID domain.NodeID) (domain.Placement, error)
- func (c *Client) UpdateIssue(ctx context.Context, id domain.NodeID, in domain.IssuePatch) (domain.Issue, error)
- func (c *Client) Viewer(ctx context.Context) (domain.User, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddAssignees ¶
func (*Client) AddComment ¶
func (*Client) AddProjectItem ¶
func (*Client) ChangeToken ¶
func (c *Client) ChangeToken(ctx context.Context, ref domain.RepoRef, project domain.NodeID) (domain.ChangeToken, error)
On a refusal confined to the optional project half, the returned token has the successfully decoded issue/viewer half and the classified error. Every other failure returns a zero token. Neither is suitable for caching.
func (*Client) ClearProjectStatus ¶
func (*Client) CloseIssue ¶
func (*Client) CreateIssue ¶
func (*Client) CredentialKey ¶
CredentialKey exposes only an opaque cache partition, never the credential.
func (*Client) Credentials ¶
func (*Client) DeleteIssue ¶
func (*Client) DoctorScopes ¶
func (*Client) IssueComments ¶
func (*Client) IssuePlacements ¶
func (*Client) LinkedProjects ¶
func (*Client) ListAssignableUsers ¶
func (*Client) ListIssues ¶
func (*Client) ListLabels ¶
func (*Client) OwnerProjects ¶
func (*Client) PRComments ¶
func (*Client) ProjectFields ¶
func (*Client) ProjectItems ¶
func (*Client) RemoveAssignees ¶
func (*Client) RemoveLabels ¶
func (*Client) RemoveProjectItem ¶
func (*Client) ReopenIssue ¶
func (*Client) Repository ¶
func (*Client) SetProjectStatus ¶
func (*Client) UnarchiveProjectItem ¶
func (*Client) UpdateIssue ¶
type Options ¶
type Options struct {
Version string
Host func(context.Context) (string, error)
APIHost string
Transport http.RoundTripper
TokenForHost func(string) (token, source string)
Now func() time.Time
}
Options supplies host/credential discovery and the HTTP boundary. Tests set APIHost, Transport and TokenForHost explicitly, avoiding all ambient auth.