plugin

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 3 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
}

func NewCommand

func NewCommand(service string, name string, description string, parameters []CommandParameter, hidden bool) *Command

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
	Parameters []ExecutionParameter
	Insecure   bool
}

func NewExecutionContext

func NewExecutionContext(
	baseUri url.URL,
	auth AuthResult,
	parameters []ExecutionParameter,
	insecure 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 {
	Filename string
	Data     []byte
}

func NewFileParameter

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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