definition

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: AGPL-3.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExit added in v0.4.0

func NewExit(uuid flows.ExitUUID, destination flows.NodeUUID, name string) flows.Exit

NewExit creates a new exit

func ReadFlow

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

ReadFlow reads a single flow definition 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 ReadLegacyFlow added in v0.4.0

func ReadLegacyFlow(data json.RawMessage) (*LegacyFlow, error)

func ReadLegacyFlows

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

ReadLegacyFlows reads in legacy formatted flows

func (*LegacyFlow) Default

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

func (*LegacyFlow) ExpireAfterMinutes added in v0.4.0

func (f *LegacyFlow) ExpireAfterMinutes() int

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) Reference added in v0.4.0

func (f *LegacyFlow) Reference() *flows.FlowReference

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) Validate

func (f *LegacyFlow) Validate(assets flows.SessionAssets) 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