executor

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestId

func RequestId() string

Types

type ExecutionContext

type ExecutionContext struct {
	Method           string
	BaseUri          url.URL
	Route            string
	ContentType      string
	Body             []byte
	PathParameters   []ExecutionParameter
	QueryParameters  []ExecutionParameter
	HeaderParameters []ExecutionParameter
	BodyParameters   []ExecutionParameter
	FormParameters   []ExecutionParameter
	AuthConfig       config.AuthConfig
	Insecure         bool
	Debug            bool
	Plugin           plugin.CommandPlugin
}

func NewExecutionContext

func NewExecutionContext(
	method string,
	uri url.URL,
	route string,
	contentType string,
	body []byte,
	pathParameters []ExecutionParameter,
	queryParameters []ExecutionParameter,
	headerParameters []ExecutionParameter,
	bodyParameters []ExecutionParameter,
	formParameters []ExecutionParameter,
	authConfig config.AuthConfig,
	insecure bool,
	debug bool,
	plugin plugin.CommandPlugin) *ExecutionContext

type ExecutionParameter

type ExecutionParameter struct {
	Name  string
	Value interface{}
}

func NewExecutionParameter

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

type Executor

type Executor interface {
	Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error
}

type FileReference

type FileReference struct {
	Filename string
	Data     []byte
}

func NewFileReference

func NewFileReference(filename string, data []byte) *FileReference

type HttpExecutor

type HttpExecutor struct {
	Authenticators []auth.Authenticator
}

func (HttpExecutor) Call

func (e HttpExecutor) Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error

type PluginExecutor added in v1.0.3

type PluginExecutor struct {
	Authenticators []auth.Authenticator
}

func (PluginExecutor) Call added in v1.0.3

func (e PluginExecutor) Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error

type Progress added in v1.0.19

type Progress struct {
	BytesRead      int64
	BytesPerSecond int64
	Completed      bool
}

func NewProgress added in v1.0.19

func NewProgress(bytesRead int64, bytesPerSecond int64, completed bool) *Progress

type ProgressBar added in v1.0.19

type ProgressBar struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

func NewProgressBar added in v1.0.19

func NewProgressBar(logger log.Logger) *ProgressBar

func (*ProgressBar) Remove added in v1.0.19

func (b *ProgressBar) Remove()

func (*ProgressBar) Update added in v1.0.19

func (b *ProgressBar) Update(text string, current int64, total int64, bytesPerSecond int64)

type ProgressReader added in v1.0.19

type ProgressReader struct {
	io.Reader
	ProgressFunc func(progress Progress)
	// contains filtered or unexported fields
}

func NewProgressReader added in v1.0.19

func NewProgressReader(reader io.Reader, progressFunc func(progress Progress)) *ProgressReader

func (*ProgressReader) Read added in v1.0.19

func (r *ProgressReader) Read(p []byte) (n int, err error)

type TypeFormatter added in v1.0.1

type TypeFormatter struct{}

func (TypeFormatter) FormatHeader added in v1.0.1

func (f TypeFormatter) FormatHeader(parameter ExecutionParameter) string

func (TypeFormatter) FormatPath added in v1.0.1

func (f TypeFormatter) FormatPath(parameter ExecutionParameter) string

func (TypeFormatter) FormatQueryString added in v1.0.1

func (f TypeFormatter) FormatQueryString(parameter ExecutionParameter) string

Jump to

Keyboard shortcuts

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