plugin

package
v1.0.36 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParameterTypeString       = "string"
	ParameterTypeBinary       = "binary"
	ParameterTypeInteger      = "integer"
	ParameterTypeNumber       = "number"
	ParameterTypeBoolean      = "boolean"
	ParameterTypeObject       = "object"
	ParameterTypeStringArray  = "stringArray"
	ParameterTypeIntegerArray = "integerArray"
	ParameterTypeNumberArray  = "numberArray"
	ParameterTypeBooleanArray = "booleanArray"
	ParameterTypeObjectArray  = "objectArray"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResult

type AuthResult struct {
	Header map[string]string
}

type Command

type Command struct {
	Service     string
	Name        string
	Description string
	Parameters  []CommandParameter
	Hidden      bool
	Category    *CommandCategory
}

func NewCommand

func NewCommand(service string) *Command

func (*Command) IsHidden added in v1.0.26

func (c *Command) IsHidden() *Command

func (*Command) WithCategory added in v1.0.26

func (c *Command) WithCategory(name string, description string) *Command

func (*Command) WithOperation added in v1.0.26

func (c *Command) WithOperation(name string, description string) *Command

func (*Command) WithParameter added in v1.0.26

func (c *Command) WithParameter(name string, type_ string, description string, required bool) *Command

type CommandCategory added in v1.0.26

type CommandCategory struct {
	Name        string
	Description string
}

func NewCommandCategory added in v1.0.26

func NewCommandCategory(name string, description string) *CommandCategory

type CommandParameter

type CommandParameter struct {
	Name        string
	Type        string
	Description string
	Required    bool
}

func NewCommandParameter

func NewCommandParameter(name string, type_ string, description string, required bool) *CommandParameter

type CommandPlugin

type CommandPlugin interface {
	Command() Command
	Execute(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error
}

type ExecutionContext

type ExecutionContext struct {
	BaseUri    url.URL
	Auth       AuthResult
	Input      *FileParameter
	Parameters []ExecutionParameter
	Insecure   bool
	Debug      bool
}

func NewExecutionContext

func NewExecutionContext(
	baseUri url.URL,
	auth AuthResult,
	input *FileParameter,
	parameters []ExecutionParameter,
	insecure bool,
	debug bool) *ExecutionContext

type ExecutionParameter

type ExecutionParameter struct {
	Name  string
	Value interface{}
}

func NewExecutionParameter

func NewExecutionParameter(name string, value interface{}) *ExecutionParameter

type FileParameter

type FileParameter struct {
	// contains filtered or unexported fields
}

func NewFileParameter

func NewFileParameter(path string, filename string, data []byte) *FileParameter

func (FileParameter) Data

func (f FileParameter) Data() (io.ReadCloser, int64, error)

func (FileParameter) Filename

func (f FileParameter) Filename() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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