runner

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exec

type Exec struct {
	Args *ExecArgs // 引数
}

Exec -- 処理実行を行うコマンド

func NewExec

func NewExec(args *ExecArgs) *Exec

NewExec -- 新しい Exec を生成して返します.

func (*Exec) Run

func (c *Exec) Run() error

Run -- 実行します.

type ExecArgs

type ExecArgs struct {
	Target  string                 // 対象
	Mapping mapping.ExampleMapping // マッピング情報
}

ExecArgs -- ExecCommand の 引数データ を表します.

func NewExecArgs

func NewExecArgs(target string, m mapping.ExampleMapping) *ExecArgs

NewExecArgs -- 新しい ExecArgs を生成して返します.

type ExecError

type ExecError struct {
	Name mapping.ExampleKey // 名称
	Err  error              // エラー
}

ExecError -- 実行時エラーを表します.

func (*ExecError) Error

func (e *ExecError) Error() string

func (*ExecError) Unwrap

func (e *ExecError) Unwrap() error

Unwrap -- 内部エラーを返します.

type Loop

type Loop struct {
	Args *LoopArgs
}

Loop -- 実行をループ処理するコマンド

func NewLoop

func NewLoop(args *LoopArgs) *Loop

NewLoop -- 新しい Loop を生成して返します.

func (*Loop) Run

func (c *Loop) Run() error

Run -- 実行します.

type LoopArgs

type LoopArgs struct {
	In      io.Reader              // 入力
	OneTime bool                   // 一回実行で完了するかどうか
	Mapping mapping.ExampleMapping // マッピング情報
}

LoopArgs -- Loop の引数データを表します.

func NewLoopArgs

func NewLoopArgs(in io.Reader, oneTime bool, m mapping.ExampleMapping) *LoopArgs

NewLoopArgs -- 新しい LoopArgs を生成して返します.

type Once

type Once struct {
	Args *OnceArgs // 引数
}

Once -- 一度だけ実行するコマンド

func NewOnce

func NewOnce(args *OnceArgs) *Once

NewOnce -- 新しい RunOnceCommand を生成して返します.

func (*Once) Run

func (c *Once) Run() error

Run -- 実行します.

type OnceArgs

type OnceArgs struct {
	ExecArgs // 引数
}

OnceArgs -- Once の引数データを表します.

func NewOnceArgs

func NewOnceArgs(target string, m mapping.ExampleMapping) *OnceArgs

NewOnceArgs -- 新しい OnceArgs を生成して返します.

type Runner

type Runner interface {
	// Run -- 実行します.
	Run() error
}

Runner -- 何かを実行するコマンドを表します.

Jump to

Keyboard shortcuts

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