definition

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2017 License: AGPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFlow

func ReadFlow(data json.RawMessage) (flows.Flow, error)

ReadFlow reads a single flow definition from the passed in byte array

func ReadFlows

func ReadFlows(data json.RawMessage) ([]flows.Flow, error)

ReadFlows reads a slice of flow definitions from the passed in byte array

Types

type LegacyFlow

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

LegacyFlow imports an old-world flow so it can be exported anew

func ReadLegacyFlows

func ReadLegacyFlows(data json.RawMessage) ([]LegacyFlow, error)

ReadLegacyFlows reads in legacy formatted flows

func (*LegacyFlow) CreateRun

func (f *LegacyFlow) CreateRun(env flows.FlowEnvironment, contact *flows.Contact, parent flows.FlowRun) flows.FlowRun

func (*LegacyFlow) Default

func (f *LegacyFlow) Default() interface{}

func (*LegacyFlow) GetNode

func (f *LegacyFlow) GetNode(uuid flows.NodeUUID) flows.Node

func (*LegacyFlow) Language

func (f *LegacyFlow) Language() utils.Language

func (*LegacyFlow) MarshalJSON

func (f *LegacyFlow) MarshalJSON() ([]byte, error)

MarshalJSON sends turns our legacy flow into bytes

func (*LegacyFlow) Name

func (f *LegacyFlow) Name() string

func (*LegacyFlow) Nodes

func (f *LegacyFlow) Nodes() []flows.Node

func (*LegacyFlow) Resolve

func (f *LegacyFlow) Resolve(key string) interface{}

func (*LegacyFlow) String

func (f *LegacyFlow) String() string

String returns the default string value for this flow, which is just our name

func (*LegacyFlow) Translations

func (f *LegacyFlow) Translations() flows.FlowTranslations

func (*LegacyFlow) UUID

func (f *LegacyFlow) UUID() flows.FlowUUID

func (*LegacyFlow) UnmarshalJSON

func (f *LegacyFlow) UnmarshalJSON(data []byte) error

UnmarshalJSON imports our JSON into a LegacyFlow object

func (*LegacyFlow) Validate

func (f *LegacyFlow) Validate() error

Validates that structurally we are sane. IE, all required fields are present and all exits with destinations point to valid endpoints.

Jump to

Keyboard shortcuts

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