executor

package
v0.0.0-...-482b64a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteActionRequest

type ExecuteActionRequest struct {
	ButtonContextID string
	Config          common.Config
}

type ExecuteActionResponse

type ExecuteActionResponse struct {
	Value *string
}

type ExecuteRequest

type ExecuteRequest struct {
	Config common.Config
}

type ExecuteResponse

type ExecuteResponse struct {
	Response string
	Code     int
}

type Executor

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

func NewExecutor

func NewExecutor(
	executor ScriptExecutor,
	httpClient HTTPClient,
	insecureHTTPClient HTTPClient,
) *Executor

func (*Executor) Execute

func (e *Executor) Execute(
	ctx context.Context,
	executeReq ExecuteRequest,
) (*ExecuteResponse, error)

func (*Executor) ExecuteAction

func (e *Executor) ExecuteAction(
	ctx context.Context,
	executeReq ExecuteActionRequest,
) (*ExecuteActionResponse, error)

type HTTPClient

type HTTPClient interface {
	NewRequest() *req.Request
}

type ScriptExecutor

type ScriptExecutor interface {
	Execute(ctx context.Context, script string, rawBody string, statusCode int) (string, error)
	ExecuteAction(
		ctx context.Context,
		script string,
		buttonContextID string,
		config common.Config,
	) (*string, error)
}

Jump to

Keyboard shortcuts

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