executor

package
v0.0.0-...-5af8055 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpExecutor

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

func NewHttpExecutor

func NewHttpExecutor() *HttpExecutor

NewHttpExecutor creates a new HttpExecutor

func (*HttpExecutor) Description

func (e *HttpExecutor) Description() string

func (*HttpExecutor) Execute

func (e *HttpExecutor) Execute(ctx context.Context, task *types.Task, otherTasks []*types.Task) (interface{}, error)

func (*HttpExecutor) ID

func (e *HttpExecutor) ID() string

func (*HttpExecutor) InputRules

func (e *HttpExecutor) InputRules() map[string]interface{}

func (*HttpExecutor) Name

func (e *HttpExecutor) Name() string

func (*HttpExecutor) New

func (e *HttpExecutor) New() types.Executor

func (*HttpExecutor) OutputRules

func (e *HttpExecutor) OutputRules() map[string]interface{}

func (*HttpExecutor) Validate

func (e *HttpExecutor) Validate(ctx context.Context, task *types.Task, otherTasks []*types.Task) error

type Input

type Input struct {
	URL     string            `json:"url" valid:"required,url"`
	Method  string            `json:"method" valid:"required,in(GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD)"`
	Headers map[string]string `json:"headers" valid:"required,dictionary"`
	Body    interface{}       `json:"body"`
}

type Output

type Output struct {
	Headers map[string]string `json:"headers" valid:"required,dictionary"`
	Body    interface{}       `json:"body"`
}

Jump to

Keyboard shortcuts

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