trigger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fire

func Fire(h int, content interface{}) (map[string]interface{}, error)

Fire is a test function for firing one of the trigger handlers with given content

func Reset

func Reset()

Reset resets the trigger for another test

Types

type Handler

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

Handler is a trigger handler

type HandlerSettings

type HandlerSettings struct {
	ASetting string `md:aSetting,required"`
}

HandlerSettings are the settings for the dummy trigger handlers

type Output

type Output struct {
	Content interface{} `md:"content"`
}

Output is the output of the dummy trigger

func (*Output) FromMap

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

FromMap sets Output from a map

func (*Output) ToMap

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

ToMap converts Output to a map

type Reply

type Reply struct {
	AReply interface{} `md:"aReply"`
}

Reply is the reply the trigger gets

func (*Reply) FromMap

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

FromMap sets Reply from a map

func (*Reply) ToMap

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

ToMap converts Reply to a map

type Settings

type Settings struct {
	ASetting int `md:"aSetting,required"`
}

Settings are the settings for the dummy trigger

type Trigger

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

Trigger is a dummy trigger for testing

func (*Trigger) Initialize

func (t *Trigger) Initialize(ctx trigger.InitContext) error

func (*Trigger) Metadata

func (t *Trigger) Metadata() *trigger.Metadata

Metadata implements trigger.Trigger.Metadata

func (*Trigger) Start

func (t *Trigger) Start() error

Start starts the dummy trigger

func (*Trigger) Stop

func (t *Trigger) Stop() error

Stop stops the dummy trigger

type TriggerFactory

type TriggerFactory struct {
}

TriggerFactory creates dummy triggers for testing

func (*TriggerFactory) Metadata

func (f *TriggerFactory) Metadata() *trigger.Metadata

func (*TriggerFactory) New

func (*TriggerFactory) New(config *trigger.Config) (trigger.Trigger, error)

New creates a new dummy trigger

Jump to

Keyboard shortcuts

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