test

package
v0.2.15 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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTrigger

func InitTrigger(factory trigger.Factory, tConfig *trigger.Config, actions map[string]action.Action) (trigger.Trigger, error)

func NewActivityInitContext

func NewActivityInitContext(settings interface{}, f mapper.Factory) activity.InitContext

func NewCounterActivity

func NewCounterActivity() activity.Activity

NewActivity creates a new AppActivity

func NewDummyAction

func NewDummyAction(f func()) action.Action

func NewLogActivity

func NewLogActivity() activity.Activity

NewActivity creates a new AppActivity

Types

type ActionInitCtx

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

func NewActionInitCtx

func NewActionInitCtx() *ActionInitCtx

func (*ActionInitCtx) AddResource

func (ctx *ActionInitCtx) AddResource(resourceType string, config *resource.Config) error

func (*ActionInitCtx) ResourceManager

func (ctx *ActionInitCtx) ResourceManager() *resource.Manager

type TestActivityContext

type TestActivityContext struct {
	TaskNameVal string
	// contains filtered or unexported fields
}

TestActivityContext is a dummy ActivityContext to assist in testing

func NewActivityContext

func NewActivityContext(md *activity.Metadata) *TestActivityContext

NewActivityContext creates a new TestActivityContext

func NewActivityContextWithAction

func NewActivityContextWithAction(md *activity.Metadata, activityHost *TestActivityHost) *TestActivityContext

NewActivityContextWithAction creates a new TestActivityContext

func (*TestActivityContext) ActivityHost

func (c *TestActivityContext) ActivityHost() activity.Host

func (*TestActivityContext) GetInput

func (c *TestActivityContext) GetInput(name string) interface{}

GetInput implements activity.Context.GetInput

func (*TestActivityContext) GetInputObject

func (c *TestActivityContext) GetInputObject(input data.StructValue) error

func (*TestActivityContext) GetOutput

func (c *TestActivityContext) GetOutput(name string) interface{}

GetOutput implements activity.Context.GetOutput

func (*TestActivityContext) GetOutputObject

func (c *TestActivityContext) GetOutputObject(output data.StructValue) error

func (*TestActivityContext) GetSetting

func (c *TestActivityContext) GetSetting(setting string) (value interface{}, exists bool)

GetSetting implements activity.Context.GetSetting

func (*TestActivityContext) GetSharedTempData

func (c *TestActivityContext) GetSharedTempData() map[string]interface{}

func (*TestActivityContext) Logger

func (c *TestActivityContext) Logger() log.Logger

func (*TestActivityContext) Name

func (c *TestActivityContext) Name() string

func (*TestActivityContext) SetInput

func (c *TestActivityContext) SetInput(name string, val interface{})

func (*TestActivityContext) SetInputObject

func (c *TestActivityContext) SetInputObject(input data.StructValue) error

func (*TestActivityContext) SetOutput

func (c *TestActivityContext) SetOutput(name string, value interface{}) error

SetOutput implements activity.Context.SetOutput

func (*TestActivityContext) SetOutputObject

func (c *TestActivityContext) SetOutputObject(output data.StructValue) error

type TestActivityHost

type TestActivityHost struct {
	HostId  string
	HostRef string

	IoMetadata *metadata.IOMetadata
	HostData   data.Scope
	ReplyData  map[string]interface{}
	ReplyErr   error
}

func (*TestActivityHost) ID

func (ac *TestActivityHost) ID() string

func (*TestActivityHost) IOMetadata

func (ac *TestActivityHost) IOMetadata() *metadata.IOMetadata

func (*TestActivityHost) Name

func (ac *TestActivityHost) Name() string

func (*TestActivityHost) Reply

func (ac *TestActivityHost) Reply(replyData map[string]interface{}, err error)

func (*TestActivityHost) Return

func (ac *TestActivityHost) Return(returnData map[string]interface{}, err error)

func (*TestActivityHost) Scope

func (ac *TestActivityHost) Scope() data.Scope

type TestActivityInitContext

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

func (*TestActivityInitContext) Logger

func (ic *TestActivityInitContext) Logger() log.Logger

func (*TestActivityInitContext) MapperFactory

func (ic *TestActivityInitContext) MapperFactory() mapper.Factory

func (*TestActivityInitContext) Settings

func (ic *TestActivityInitContext) Settings() map[string]interface{}

type TestCounterActivity

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

func (*TestCounterActivity) Eval

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

Eval implements api.Activity.Eval - Logs the Message

func (*TestCounterActivity) Metadata

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

Metadata returns the activity's metadata

type TestLogActivity

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

func (*TestLogActivity) Eval

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

Eval implements api.Activity.Eval - Logs the Message

func (*TestLogActivity) Metadata

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

Metadata returns the activity's metadata

Jump to

Keyboard shortcuts

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