flow

package
v0.0.0-...-9af3d78 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	UUID         string   `json:"uuid"`
	Attachments  []string `json:"attachments"`
	Text         string   `json:"text"`
	Type         string   `json:"type"`
	QuickReplies []string `json:"quick_replies"`
}

type Exit

type Exit struct {
	UUID            string  `json:"uuid"`
	DestinationUUID *string `json:"destination_uuid"`
}

type Flow

type Flow struct {
	Name               string `json:"name"`
	UUID               string `json:"uuid"`
	SpecVersion        string `json:"spec_version"`
	Language           string `json:"language"`
	Type               string `json:"type"`
	Nodes              []Node `json:"nodes"`
	UI                 UI     `json:"_ui"`
	Revision           int    `json:"revision"`
	ExpireAfterMinutes int    `json:"expire_after_minutes"`
}

func MessagesToFlow

func MessagesToFlow(msgs []string) Flow

func NewFlow

func NewFlow() Flow

type Import

type Import struct {
	Version   string     `json:"version"`
	Site      string     `json:"site"`
	Flows     []Flow     `json:"flows"`
	Campaigns []struct{} `json:"campaigns"`
	Triggers  []struct{} `json:"triggers"`
	Fields    []struct{} `json:"fields"`
	Groups    []struct{} `json:"groups"`
}

func NewImport

func NewImport() Import

type Node

type Node struct {
	UUID    string   `json:"uuid"`
	Actions []Action `json:"actions"`
	Exits   []Exit   `json:"exits"`
}

func NodesFromMessages

func NodesFromMessages(msgs []string) []Node

type Position

type Position struct {
	Left int `json:"left"`
	Top  int `json:"top"`
}

type UI

type UI struct {
	Nodes map[string]UINode `json:"nodes"`
}

func UIFromNodes

func UIFromNodes(nodes []Node) UI

type UINode

type UINode struct {
	Position Position `json:"position"`
	Type     string   `json:"type"`
}

Jump to

Keyboard shortcuts

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