Version: v0.0.0-...-cb77e8e Latest Latest

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0



Package github provides a barista module to show github notifications.



This section is empty.


This section is empty.


This section is empty.


type Module

type Module struct {
	// contains filtered or unexported fields

Module represents a GitHub barista module that displays notification counts.

func New

func New(clientID, clientSecret string) *Module

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

func (*Module) Output

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

Output sets the output format for this module.

func (*Module) Stream

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

Stream starts the module.

type Notifications

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

func (n Notifications) Total() int

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL