activity

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Messages is the message the dummy activity got in its input
	Message = ""
	// HasEvaled is true when the dummy activity has been evaluated
	HasEvaled = false
)

Functions

func New

New creates a new dummy activity

func Reset

func Reset()

Reset resets the activity for another test

Types

type Activity

type Activity struct {
}

Activity is a dummy activity for testing

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval evaluates the dummy activity

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata returns the metadata for the dummy activity

type Input

type Input struct {
	Message string `md:message,required"`
}

Input are the inputs for the dummy activity

func (*Input) FromMap

func (r *Input) FromMap(values map[string]interface{}) error

FromMap sets the Input from a map

func (*Input) ToMap

func (r *Input) ToMap() map[string]interface{}

ToMap converts the Input to a map

type Output

type Output struct {
	Data string `md:data,required"`
}

Output are the outputs for the dummy activity

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

FromMap sets the Output from a map

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

ToMap converts the Output to a map

type Settings

type Settings struct {
}

Settings are the settings for the dummy activity

Jump to

Keyboard shortcuts

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