github

package
v0.0.0-...-0216833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package github implements the GitHub read backend using go-gh API clients.

Index

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 New

func New(opts Options) *Client

func (*Client) AddAssignees

func (c *Client) AddAssignees(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)

func (*Client) AddComment

func (c *Client) AddComment(ctx context.Context, id domain.NodeID, body string) (domain.CommentResult, error)

func (*Client) AddLabels

func (c *Client) AddLabels(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)

func (*Client) AddProjectItem

func (c *Client) AddProjectItem(ctx context.Context, projectID, issueID domain.NodeID) (domain.Placement, error)

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 (c *Client) ClearProjectStatus(ctx context.Context, projectID, itemID, fieldID domain.NodeID) error

func (*Client) CloseIssue

func (c *Client) CloseIssue(ctx context.Context, id domain.NodeID, reason string) (domain.Issue, error)

func (*Client) CreateIssue

func (c *Client) CreateIssue(ctx context.Context, in domain.CreateInput) (domain.Issue, error)

func (*Client) CredentialKey

func (c *Client) CredentialKey(ctx context.Context) (string, error)

CredentialKey exposes only an opaque cache partition, never the credential.

func (*Client) Credentials

func (c *Client) Credentials(ctx context.Context) (domain.CredentialInfo, error)

func (*Client) DeleteIssue

func (c *Client) DeleteIssue(ctx context.Context, id domain.NodeID) error

func (*Client) DoctorScopes

func (c *Client) DoctorScopes(ctx context.Context) (domain.CredentialInfo, error)

func (*Client) Issue

func (c *Client) Issue(ctx context.Context, ref domain.RepoRef, n int, selected domain.NodeID) (domain.IssueDetail, error)

func (*Client) IssueComments

func (c *Client) IssueComments(ctx context.Context, r domain.RepoRef, n int, p domain.PageRequest) (domain.Page[domain.Comment], error)

func (*Client) IssuePlacements

func (c *Client) IssuePlacements(ctx context.Context, id domain.NodeID) ([]domain.ProjectItem, error)

func (*Client) LinkedProjects

func (c *Client) LinkedProjects(ctx context.Context, r domain.RepoRef, p domain.PageRequest) (domain.Page[domain.Project], error)

func (*Client) ListAssignableUsers

func (c *Client) ListAssignableUsers(ctx context.Context, ref domain.RepoRef, p domain.PageRequest) (domain.Page[domain.User], error)

func (*Client) ListIssues

func (c *Client) ListIssues(ctx context.Context, ref domain.RepoRef, filter domain.IssueFilter, p domain.PageRequest, selected domain.NodeID) (domain.Page[domain.Issue], error)

func (*Client) ListLabels

func (c *Client) ListLabels(ctx context.Context, ref domain.RepoRef, p domain.PageRequest) (domain.Page[domain.Label], error)

func (*Client) ListPRs

func (*Client) OwnerProjects

func (c *Client) OwnerProjects(ctx context.Context, owner string, p domain.PageRequest) (domain.Page[domain.Project], error)

func (*Client) PR

func (c *Client) PR(ctx context.Context, ref domain.RepoRef, n int) (domain.PRDetail, error)

func (*Client) PRComments

func (*Client) Project

func (c *Client) Project(ctx context.Context, r domain.ProjectRef) (domain.Project, error)

func (*Client) ProjectFields

func (c *Client) ProjectFields(ctx context.Context, id domain.NodeID) (domain.BoardInfo, error)

func (*Client) ProjectItems

func (*Client) RateLimit

func (c *Client) RateLimit() domain.RateLimit

func (*Client) RefreshCredentials

func (c *Client) RefreshCredentials(ctx context.Context) error

func (*Client) RemoveAssignees

func (c *Client) RemoveAssignees(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)

func (*Client) RemoveLabels

func (c *Client) RemoveLabels(ctx context.Context, id domain.NodeID, ids []domain.NodeID) (domain.Issue, error)

func (*Client) RemoveProjectItem

func (c *Client) RemoveProjectItem(ctx context.Context, projectID, itemID domain.NodeID) error

func (*Client) ReopenIssue

func (c *Client) ReopenIssue(ctx context.Context, id domain.NodeID) (domain.Issue, error)

func (*Client) Repository

func (c *Client) Repository(ctx context.Context, ref domain.RepoRef) (domain.Repository, error)

func (*Client) SetProjectStatus

func (c *Client) SetProjectStatus(ctx context.Context, projectID, itemID, fieldID domain.NodeID, optionID string) error

func (*Client) UnarchiveProjectItem

func (c *Client) UnarchiveProjectItem(ctx context.Context, projectID, itemID domain.NodeID) (domain.Placement, error)

func (*Client) UpdateIssue

func (c *Client) UpdateIssue(ctx context.Context, id domain.NodeID, in domain.IssuePatch) (domain.Issue, error)

func (*Client) Viewer

func (c *Client) Viewer(ctx context.Context) (domain.User, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL