def

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package def contains definitions / interfaces used across hooks packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	HasRun() bool
	Run(env map[string]string) error
	Output() string
}

Executor can execute a hook and return the output from hook execution.

type ExecutorCreator

type ExecutorCreator interface {
	CanCreate(hook *config.Hook) bool
	Create(hook *config.Hook) (Executor, error)
}

ExecutorCreator defines a creator that can make executors. Should always call CanCreate first to check if this specific creator can create an executor for hook.

type Options

type Options struct {
	Getter   *getter.Client
	CacheDir string
}

Options sent to New function when making a new Runner.

Jump to

Keyboard shortcuts

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