reminder

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Apache-2.0 Imports: 10 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 reminder provides the clients used by the github-reminder app.

Index

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

func (c *InstallationClient) LabelsInRepo(ctx context.Context, owner, name string) ([]Label, error)

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

func (c *InstallationClient) UpdateIssue(ctx context.Context, owner, name string, number int) error

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.

type Label

type Label struct {
	Name string
	Days int
}

A Label has simply a name and the corresponding number of days.

Jump to

Keyboard shortcuts

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