activities

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry []any = make([]any, 0)

Functions

func ParseHTTPArguments

func ParseHTTPArguments(task *model.CallHTTP, state *utils.State) (*model.HTTPArguments, error)

ParseHTTPArguments note that I looked at the github.com/go-viper/mapstructure/v2.Decode function, but this wasn't able to decode some of the more complex data types. This is more heavyweight than I'd like, but it's fine for now.

func ParseOutput

func ParseOutput(outputType string, httpResp HTTPResponse, raw []byte) any

Types

type CallGRPC

type CallGRPC struct{}

func (*CallGRPC) CallGRPCActivity

func (c *CallGRPC) CallGRPCActivity(
	ctx context.Context, task *model.CallGRPC, input any, state *utils.State,
) (any, error)

type CallHTTP

type CallHTTP struct{}

func (*CallHTTP) CallHTTPActivity

func (c *CallHTTP) CallHTTPActivity(ctx context.Context, task *model.CallHTTP, input any, state *utils.State) (any, error)

type HTTPRequest

type HTTPRequest struct {
	Method  string            `json:"method"`
	URI     string            `json:"uri"`
	Headers map[string]string `json:"headers,omitempty"`
}

@link: https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#http-request

type HTTPResponse

type HTTPResponse struct {
	Request    HTTPRequest       `json:"request"`
	StatusCode int               `json:"statusCode"`
	Headers    map[string]string `json:"headers,omitempty"`
	Content    any               `json:"content,omitempty"`
}

@link: https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#http-response

type Run

type Run struct{}

func (*Run) CallContainerActivity added in v0.6.4

func (r *Run) CallContainerActivity(ctx context.Context, task *model.RunTask, input any, state *utils.State) (any, error)

func (*Run) CallScriptActivity

func (r *Run) CallScriptActivity(ctx context.Context, task *model.RunTask, input any, state *utils.State) (any, error)

func (*Run) CallShellActivity

func (r *Run) CallShellActivity(ctx context.Context, task *model.RunTask, input any, state *utils.State) (any, error)

Jump to

Keyboard shortcuts

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