playbook

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MethodT

type MethodT struct {
	Description     string      `yaml:"description,omitempty"`
	SchemaInterface interface{} `yaml:"schema,omitempty"`
	Shell           *ShellT     `yaml:"shell,omitempty"`
	// contains filtered or unexported fields
}

func (MethodT) CanExec

func (self MethodT) CanExec() bool

func (MethodT) Exec

func (self MethodT) Exec(req *dispatch.RPCRequest, methodName string) (interface{}, error)

type Playbook

type Playbook struct {
	Config PlaybookConfig
}

func NewPlaybook

func NewPlaybook() *Playbook

func (*Playbook) Run

func (self *Playbook) Run(serverEntry client.ServerEntry) error

type PlaybookConfig

type PlaybookConfig struct {
	Version string                `yaml:"version,omitempty"`
	Methods map[string](*MethodT) `yaml:"methods,omitempty"`
}

func (*PlaybookConfig) ReadConfig

func (self *PlaybookConfig) ReadConfig(filePath string) error

func (*PlaybookConfig) ReadConfigBytes

func (self *PlaybookConfig) ReadConfigBytes(data []byte) error

type ShellT

type ShellT struct {
	Cmd     string   `yaml:"command"`
	Env     []string `yaml:"env,omitempty"`
	Timeout *int     `yaml:"timeout,omitempty"`
}

Jump to

Keyboard shortcuts

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