executor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 13 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
	PathParameters   []ExecutionParameter
	QueryParameters  []ExecutionParameter
	HeaderParameters []ExecutionParameter
	BodyParameters   []ExecutionParameter
	FormParameters   []ExecutionParameter
	AuthConfig       config.AuthConfig
	Insecure         bool
	Debug            bool
}

func NewExecutionContext

func NewExecutionContext(
	method string,
	uri url.URL,
	route string,
	pathParameters []ExecutionParameter,
	queryParameters []ExecutionParameter,
	headerParameters []ExecutionParameter,
	bodyParameters []ExecutionParameter,
	formParameters []ExecutionParameter,
	authConfig config.AuthConfig,
	insecure bool,
	debug bool) *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) (string, 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) (string, error)

type HttpLogger

type HttpLogger struct {
	Output *bytes.Buffer
}

func (HttpLogger) LogRequest

func (l HttpLogger) LogRequest(request *http.Request, body io.Reader, debug bool) error

func (HttpLogger) LogResponse

func (l HttpLogger) LogResponse(response *http.Response, debug bool) error

Jump to

Keyboard shortcuts

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