Documentation ¶
Overview ¶
Package reminder provides the clients used by the github-reminder app.
Index ¶
- type ApplicationClient
- type InstallationClient
- func (c *InstallationClient) LabelsInRepo(ctx context.Context, owner, name string) ([]Label, error)
- func (c *InstallationClient) UpdateInstallation(ctx context.Context) error
- func (c *InstallationClient) UpdateIssue(ctx context.Context, owner, name string, number int) error
- func (c *InstallationClient) UpdateRepo(ctx context.Context, owner, name string) error
- type Label
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationClient ¶
type ApplicationClient struct {
// contains filtered or unexported fields
}
An ApplicationClient provides the methods that do not depend on an installation.
func NewApplicationClient ¶
func NewApplicationClient(appID int, key []byte, transport http.RoundTripper) (*ApplicationClient, error)
NewApplicationClient returns a new ApplicationClient. If the given transport is nil, http.DefaultTransport will be used instead.
func (*ApplicationClient) Installations ¶
func (c *ApplicationClient) Installations(ctx context.Context) ([]int, error)
Installations lists all of the installation ids for the authenticated application.
type InstallationClient ¶
type InstallationClient struct {
// contains filtered or unexported fields
}
An InstallationClient provides all of the features depending on a specific installation.
func NewInstallationClient ¶
func NewInstallationClient(appID, installationID int, key []byte, transport http.RoundTripper) (*InstallationClient, error)
NewInstallationClient returns a new InstallationClient. If transport is nil http.DefaultTransport will be used.
func (*InstallationClient) LabelsInRepo ¶
LabelsInRepo lists all of the deadline related labels in a repository.
func (*InstallationClient) UpdateInstallation ¶
func (c *InstallationClient) UpdateInstallation(ctx context.Context) error
UpdateInstallation iterates over all of the repositories in the installation updating all deadline labels.
func (*InstallationClient) UpdateIssue ¶
UpdateIssue finds a deadline in the issue and updates its labels accordingly.
func (*InstallationClient) UpdateRepo ¶
func (c *InstallationClient) UpdateRepo(ctx context.Context, owner, name string) error
UpdateRepo iterates over all of the issues and PRs in a repository updating all deadline labels.