executor

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const NotConfiguredErrorTemplate = `` /* 141-byte string literal not displayed */

Variables

This section is empty.

Functions

func RequestId

func RequestId() string

Types

type ExecutionContext

type ExecutionContext struct {
	Organization string
	Tenant       string
	Method       string
	BaseUri      url.URL
	Route        string
	ContentType  string
	Input        *FileReference
	Parameters   ExecutionContextParameters
	AuthConfig   config.AuthConfig
	Insecure     bool
	Debug        bool
	Plugin       plugin.CommandPlugin
}

func NewExecutionContext

func NewExecutionContext(
	organization string,
	tenant string,
	method string,
	uri url.URL,
	route string,
	contentType string,
	input *FileReference,
	parameters ExecutionContextParameters,
	authConfig config.AuthConfig,
	insecure bool,
	debug bool,
	plugin plugin.CommandPlugin) *ExecutionContext

type ExecutionContextParameters added in v1.0.39

type ExecutionContextParameters struct {
	Path   []ExecutionParameter
	Query  []ExecutionParameter
	Header []ExecutionParameter
	Body   []ExecutionParameter
	Form   []ExecutionParameter
}

func NewExecutionContextParameters added in v1.0.39

func NewExecutionContextParameters(
	path []ExecutionParameter,
	query []ExecutionParameter,
	header []ExecutionParameter,
	body []ExecutionParameter,
	form []ExecutionParameter) *ExecutionContextParameters

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 {
	// contains filtered or unexported fields
}

func NewFileReference

func NewFileReference(path string) *FileReference

func NewFileReferenceData added in v1.0.23

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

func (FileReference) Data

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

func (FileReference) Filename

func (f FileReference) Filename() string

type HttpExecutor

type HttpExecutor struct {
	Authenticators []auth.Authenticator
}

func (HttpExecutor) Call

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

func (HttpExecutor) LogRequest added in v1.0.23

func (e HttpExecutor) LogRequest(logger log.Logger, request *http.Request)

func (HttpExecutor) LogResponse added in v1.0.23

func (e HttpExecutor) LogResponse(logger log.Logger, response *http.Response, body []byte)

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 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