urknall: github.com/dynport/urknall/cmd Index | Files

package cmd

import "github.com/dynport/urknall/cmd"

The Command Interfaces

This package contains a set of interfaces, commands must or can implement.


Package Files


type Command Uses

type Command interface {
    Shell() string

The Command interface is used to have specialized commands that are used for execution and logging (the latter is useful to hide the gory details of more complex commands).

type Logger Uses

type Logger interface {
    Logging() string

The Logger interface should be implemented by commands, which hide their intent behind a series of complex shell commands. The returned string will be printed instead of the raw output of the Shell function.

type Renderer Uses

type Renderer interface {
    Render(i interface{})

Often it is convenient to directly use values or methods of the template in the commands (using go's templating mechanism).

type StdinConsumer Uses

type StdinConsumer interface {
    Input() io.ReadCloser

If a command needs to send something to the remote host (a file for example) the content can be made available on standard input of the remote command. The command must make sure that changed local content will reissue execution of the command (by printing the content's hash to standard output for example).

type Validator Uses

type Validator interface {
    Validate() error

Interface used for types that will validate its state. An error is returned if the state is invalid.

Package cmd imports 1 packages (graph) and is imported by 4 packages. Updated 2016-07-21. Refresh now. Tools for package owners.