Index | Files

package github

import ""

Package github provides a barista module to show github notifications.


Package Files


type Module Uses

type Module struct {
    // contains filtered or unexported fields

Module represents a GitHub barista module that displays notification counts.

func New Uses

func New(clientID, clientSecret string) *Module

New creates a GitHub module using the given clientID and secret.

func (*Module) Output Uses

func (m *Module) Output(outputFunc func(Notifications) bar.Output) *Module

Output sets the output format for this module.

func (*Module) Stream Uses

func (m *Module) Stream(sink bar.Sink)

Stream starts the module.

type Notifications Uses

type Notifications map[string]int

Notifications represents the notifications grouped by reasons. The key is the reason ("comment", "mention"), and the value is the number of notifications for that reason. See for a list of reasons.

func (Notifications) Total Uses

func (n Notifications) Total() int

Total returns the total number of unread notifications across all categories.

Package github imports 13 packages (graph) and is imported by 2 packages. Updated 2018-11-02. Refresh now. Tools for package owners.