command

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

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

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

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 ExecCommand

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

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

func NewExecCommand

func NewExecCommand(args *ExecArgs) *ExecCommand

NewExecCommand -- 新しい ExecCommand を生成して返します.

func (*ExecCommand) Run

func (c *ExecCommand) Run() error

Run -- 実行します.

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 RunLoopArgs

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

RunLoopArgs -- RunLoopCommand の引数データを表します.

func NewRunLoopArgs

func NewRunLoopArgs(oneTime bool, m mapping.ExampleMapping) *RunLoopArgs

NewRunLoopArgs -- 新しい RunLoopArgs を生成して返します.

type RunLoopCommand

type RunLoopCommand struct {
	Args *RunLoopArgs
}

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

func NewRunLoopCommand

func NewRunLoopCommand(args *RunLoopArgs) *RunLoopCommand

NewRunLoopCommand -- 新しい RunLoopCommand を生成して返します.

func (*RunLoopCommand) Run

func (c *RunLoopCommand) Run() error

Run -- 実行します.

type RunOnceArgs

type RunOnceArgs struct {
	ExecArgs // 引数
}

RunOnceArgs -- RunOnceCommand の引数データを表します.

func NewRunOnceArgs

func NewRunOnceArgs(target string, m mapping.ExampleMapping) *RunOnceArgs

NewRunOnceArgs -- 新しい RunOnceArgs を生成して返します.

type RunOnceCommand

type RunOnceCommand struct {
	Args *RunOnceArgs // 引数
}

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

func NewRunOnceCommand

func NewRunOnceCommand(args *RunOnceArgs) *RunOnceCommand

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

func (*RunOnceCommand) Run

func (c *RunOnceCommand) Run() error

Run -- 実行します.

Jump to

Keyboard shortcuts

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