interpreter

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

go build:linux

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildExecuteCommandArgsFunc added in v1.0.0

type BuildExecuteCommandArgsFunc = func(command string) []string

type BuildExecuteFileArgsFunc added in v1.0.0

type BuildExecuteFileArgsFunc = func(path string) []string

type Executor added in v1.0.0

type Executor interface {
	Execute(
		ctx context.Context,
		message *Message,
		device agent.Device,
		logger hclog.Logger,
		sys agent.SystemInfoProvider,
		domain agent.DomainInfoProvider,
	) []byte
	AlwaysPostback() bool
}

func NewBaseExecutor added in v1.0.0

func NewBaseExecutor(
	shell string,
	shellVersionCheckCommand string,
	writeUtf8BOM bool,
	buildExecuteCommandArgs BuildExecuteCommandArgsFunc,
	buildExecuteFileArgs BuildExecuteFileArgsFunc,
	fs utils.FileSystem,
) Executor

func NewBashExecutor added in v1.0.0

func NewBashExecutor() Executor

func NewExecutor added in v1.0.0

func NewExecutor() Executor

func NewPwshExecutor added in v1.0.0

func NewPwshExecutor() Executor

type Message

type Message struct {
	PostId              string      `json:"post_id"`
	Commands            string      `json:"commands"`
	InterpreterOverride StringFalse `json:"interpreter_override"`
	GetInstallation     bool        `json:"get_installation"`
	Type                string      `json:"type"`
	Content             string      `json:"content"`
}

func (*Message) CreatePostbackRequest added in v0.2.0

func (msg *Message) CreatePostbackRequest(
	ctx context.Context,
	device agent.Device,
	body io.Reader,
) (*http.Request, error)

func (*Message) Execute

func (msg *Message) Execute(
	executor Executor,
	ctx context.Context,
	device agent.Device,
	logger hclog.Logger,
	sys agent.SystemInfoProvider,
	domain agent.DomainInfoProvider,
) []byte

func (*Message) Parse

func (msg *Message) Parse(data []byte) error

type StringFalse added in v0.4.3

type StringFalse struct {
	Value string
}

func (*StringFalse) UnmarshalJSON added in v0.4.3

func (sf *StringFalse) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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