definition

package
v0.50.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: AGPL-3.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentSpecVersion = semver.MustParse("13.0")

CurrentSpecVersion is the flow spec version supported by this library

Functions

func IsSpecVersionSupported added in v0.27.8

func IsSpecVersionSupported(ver *semver.Version) bool

IsSpecVersionSupported determines if we can read the given flow version

func MustReadFlowFromGeneric added in v0.39.4

func MustReadFlowFromGeneric(data map[string]interface{}) flows.Flow

MustReadFlowFromGeneric tries to read a flow from the given generic map, panics if it can't

func NewExit added in v0.4.0

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

NewExit creates a new exit

func NewFlow added in v0.6.2

func NewFlow(uuid assets.FlowUUID, name string, language envs.Language, flowType flows.FlowType, revision int, expireAfterMinutes int, localization flows.Localization, nodes []flows.Node, ui json.RawMessage) (flows.Flow, error)

NewFlow creates a new flow

func NewFlowAssets added in v0.15.0

func NewFlowAssets(source assets.Source) flows.FlowAssets

NewFlowAssets creates a new flow assets

func NewLocalization added in v0.6.2

func NewLocalization() flows.Localization

func NewNode added in v0.6.2

func NewNode(uuid flows.NodeUUID, actions []flows.Action, router flows.Router, exits []flows.Exit) flows.Node

NewNode creates a new flow node

func ReadFlow

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

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

func ReadFlowFromGeneric added in v0.39.4

func ReadFlowFromGeneric(data map[string]interface{}) (flows.Flow, error)

ReadFlowFromGeneric tries to read a flow in the current spec from the given generic map

func ReadLocalization added in v0.6.2

func ReadLocalization(data json.RawMessage) (flows.Localization, error)

ReadLocalization reads entire localization flow segment

Types

This section is empty.

Jump to

Keyboard shortcuts

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