outputs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path string
}

func NewFile

func NewFile(path string) *File

func (*File) End

func (s *File) End()

func (*File) GetName

func (s *File) GetName() string

func (*File) Refresh

func (s *File) Refresh(timeLeft time.Duration)

func (*File) Start

func (s *File) Start(pomodoroDuration time.Duration, refreshRate time.Duration, message string)

type Output

type Output interface {
	GetName() string
	Refresh(timeLeft time.Duration)
	Start(pomodoroDuration time.Duration, refreshRate time.Duration, message string)
	End()
}

Output is a external representation of the current pomodoro.

type OutputManager

type OutputManager struct {
	Outputs []*Output
}

func NewOutputManager

func NewOutputManager() OutputManager

func (*OutputManager) Add

func (o *OutputManager) Add(output *Output)

func (*OutputManager) End

func (o *OutputManager) End()

func (*OutputManager) Refresh

func (o *OutputManager) Refresh(timeSpent time.Duration)

func (*OutputManager) Start

func (o *OutputManager) Start(pomodoroDuration time.Duration, refreshRate time.Duration, message string)

type Slack added in v0.2.0

type Slack struct {
	DoNotDisturb bool
	Emoji        string
	// contains filtered or unexported fields
}

func NewSlack added in v0.2.0

func NewSlack(token string, dnd bool, emoji string) *Slack

func (*Slack) End added in v0.2.0

func (s *Slack) End()

func (*Slack) GetName added in v0.2.0

func (s *Slack) GetName() string

func (*Slack) Refresh added in v0.2.0

func (s *Slack) Refresh(timeLeft time.Duration)

func (*Slack) Start added in v0.2.0

func (s *Slack) Start(pomodoroDuration time.Duration, refreshRate time.Duration, message string)

type Stdout

type Stdout struct {
	ShowPercent bool
	Size        int
	// contains filtered or unexported fields
}

func NewStdout

func NewStdout(showPercent bool) *Stdout

func (*Stdout) End

func (s *Stdout) End()

func (*Stdout) GetName

func (s *Stdout) GetName() string

func (*Stdout) Refresh

func (s *Stdout) Refresh(_timeLeft time.Duration)

func (*Stdout) Start

func (s *Stdout) Start(pomodoroDuration time.Duration, refreshRate time.Duration, message string)

Jump to

Keyboard shortcuts

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