box

package module
v0.0.0-...-e35e166 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: AGPL-3.0 Imports: 3 Imported by: 1

README

box

执行各种命令的潘多拉魔盒,总有一款是你喜欢的,满足你需求的。

例如:

  1. 拉取某服务器的磁盘空间信息
  2. 拉取某服务器的OS版本
  3. 运行某服务器程序

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOption

type ActionOption struct {
	Driver    string         `json:"driver"`    // driver namespace
	Action    string         `json:"action"`    // action namespace
	OutputVar string         `json:"outputVar"` // 定义输出结果存储的变量名
	Input     drivers.Values `json:"input"`
}

ActionOption 信息

type Box

type Box struct {
	Title       string          `json:"title"`     //魔盒名称,简称
	Namespace   string          `json:"namespace"` //魔盒标识符,必须全局唯一。依次同其他魔盒器进行区分
	Description string          `json:"desc"`      //魔盒描述,在使用魔盒时,可以显示对魔盒的描述,以方便了解魔盒功能
	Options     drivers.Options `json:"options"`   //魔盒器配置信息
	Actions     []ActionOption  `json:"actions"`
	Input       drivers.Values  `json:"input"`
}

Box Driver的变种

func New

func New(title, namespace string, description ...string) (*Box, error)

New 新建驱动器

func (*Box) Exec

func (b *Box) Exec() (output interface{}, err error)

Exec 执行Action

Directories

Path Synopsis
cmd
driver-gen command

Jump to

Keyboard shortcuts

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