hooks

package
v2.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonDriver

type DaemonDriver struct {
	// contains filtered or unexported fields
}

DaemonDriver is a driver that daemons some texts to the terminal

func NewDaemonDriver

func NewDaemonDriver(line string) (DaemonDriver, error)

NewDaemonDriver returns a DaemonDriver instance

func (DaemonDriver) Close

func (d DaemonDriver) Close() error

Close closes a running command

func (DaemonDriver) Run

func (d DaemonDriver) Run(args RunArgs) error

Run daemons a line to the terminal

type ExecDriver

type ExecDriver struct {
	// contains filtered or unexported fields
}

ExecDriver is a driver that execs some texts to the terminal

func NewExecDriver

func NewExecDriver(line string) (ExecDriver, error)

NewExecDriver returns a ExecDriver instance

func (ExecDriver) Close

func (d ExecDriver) Close() error

Close is mandatory for the interface, here it does nothing

func (ExecDriver) Run

func (d ExecDriver) Run(args RunArgs) error

Run execs a line to the terminal

type HookDriver

type HookDriver interface {
	Run(RunArgs) error
	Close() error
}

HookDriver represents a hook driver

func New

func New(expr string) (HookDriver, error)

New returns an HookDriver instance

type HookDrivers

type HookDrivers []HookDriver

HookDrivers represents a slice of HookDriver

func (*HookDrivers) Close

func (hd *HookDrivers) Close() []error

Close closes all hook drivers and returns a slice of errs

type Hooks

Hooks represents a slice of Hook

func (*Hooks) InvokeAll

func (h *Hooks) InvokeAll(args RunArgs) (HookDrivers, error)

InvokeAll calls all hooks

type NotificationDriver

type NotificationDriver struct {
	// contains filtered or unexported fields
}

NotificationDriver is a driver that notifications some texts to the terminal

func NewNotificationDriver

func NewNotificationDriver(line string) (NotificationDriver, error)

NewNotificationDriver returns a NotificationDriver instance

func (NotificationDriver) Close

func (d NotificationDriver) Close() error

Close is mandatory for the interface, here it does nothing

func (NotificationDriver) Run

func (d NotificationDriver) Run(args RunArgs) error

Run notifications a line to the terminal

type RunArgs

type RunArgs interface{}

RunArgs is a map of interface{}

type WriteDriver

type WriteDriver struct {
	// contains filtered or unexported fields
}

WriteDriver is a driver that writes some texts to the terminal

func NewWriteDriver

func NewWriteDriver(line string) (WriteDriver, error)

NewWriteDriver returns a WriteDriver instance

func (WriteDriver) Close

func (d WriteDriver) Close() error

Close is mandatory for the interface, here it does nothing

func (WriteDriver) Run

func (d WriteDriver) Run(args RunArgs) error

Run writes a line to the terminal

Jump to

Keyboard shortcuts

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