Documentation ¶
Index ¶
- func CurrentSpecVersion() string
- func IsVersionSupported(version string) bool
- type AssetsSource
- type Contact
- type Engine
- type Environment
- type Event
- type EventSlice
- type FlowReference
- type Hint
- type Modifier
- type ModifierSlice
- type MsgIn
- type Resume
- type Session
- type SessionAndSprint
- type SessionAssets
- type Sprint
- type StringSlice
- type Trigger
- type Wait
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentSpecVersion ¶ added in v0.38.3
func CurrentSpecVersion() string
CurrentSpecVersion returns the current flow spec version
func IsVersionSupported ¶ added in v0.66.2
IsVersionSupported returns whether the given spec version is supported
Types ¶
type AssetsSource ¶
type AssetsSource struct {
// contains filtered or unexported fields
}
AssetsSource is a static asset source
func NewAssetsSource ¶
func NewAssetsSource(src string) (*AssetsSource, error)
NewAssetsSource creates a new static asset source
type Contact ¶
type Contact struct {
// contains filtered or unexported fields
}
Contact represents a person who is interacting with a flow
func NewEmptyContact ¶
func NewEmptyContact(sa *SessionAssets) *Contact
NewEmptyContact creates a new contact
type Engine ¶ added in v0.27.4
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) NewSession ¶ added in v0.27.4
func (e *Engine) NewSession(sa *SessionAssets, trigger *Trigger) (*SessionAndSprint, error)
NewSession creates a new session
func (*Engine) ReadSession ¶ added in v0.27.4
func (e *Engine) ReadSession(a *SessionAssets, data string) (*Session, error)
ReadSession reads an existing session from JSON
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment defines the environment for expression evaluation etc
func NewEnvironment ¶
func NewEnvironment(dateFormat string, timeFormat string, timezone string, defaultLanguage string, allowedLanguages *StringSlice, defaultCountry string, redactionPolicy string) (*Environment, error)
NewEnvironment creates a new environment.
type EventSlice ¶
type EventSlice struct {
// contains filtered or unexported fields
}
EventSlice wraps a slice of events
func NewEventSlice ¶
func NewEventSlice(capacity int) *EventSlice
NewEventSlice creates a new slice of events
func (*EventSlice) Get ¶
func (l *EventSlice) Get(index int) *Event
Get returns the event at the given index
type FlowReference ¶
type FlowReference struct {
// contains filtered or unexported fields
}
FlowReference is a reference to a flow
func NewFlowReference ¶
func NewFlowReference(uuid string, name string) *FlowReference
NewFlowReference creates a new flow reference
type ModifierSlice ¶
type ModifierSlice struct {
// contains filtered or unexported fields
}
ModifierSlice wraps a slice of modifiers
func NewModifierSlice ¶
func NewModifierSlice(capacity int) *ModifierSlice
NewModifierSlice creates a new slice of modifiers
func (*ModifierSlice) Add ¶
func (l *ModifierSlice) Add(item *Modifier)
Add adds an event to this slice
func (*ModifierSlice) Get ¶
func (l *ModifierSlice) Get(index int) *Modifier
Get returns the event at the given index
func (*ModifierSlice) Length ¶
func (l *ModifierSlice) Length() int
Length gets the length of this slice
type MsgIn ¶
type MsgIn struct {
// contains filtered or unexported fields
}
MsgIn is an incoming message
func NewMsgIn ¶
func NewMsgIn(uuid string, text string, attachments *StringSlice) *MsgIn
NewMsgIn creates a new incoming message
func (*MsgIn) Attachments ¶
func (m *MsgIn) Attachments() *StringSlice
type Resume ¶
type Resume struct {
// contains filtered or unexported fields
}
Resume represents something which can resume a session
func NewMsgResume ¶
func NewMsgResume(environment *Environment, contact *Contact, msg *MsgIn) *Resume
NewMsgResume creates a new message resume
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents a session with the flow engine
func (*Session) Assets ¶
func (s *Session) Assets() *SessionAssets
Assets returns the assets associated with this session
func (*Session) GetWait ¶
GetWait gets the current wait of this session.. can't call this Wait() because Object in Java already has a wait() method
type SessionAndSprint ¶ added in v0.38.0
type SessionAndSprint struct {
// contains filtered or unexported fields
}
SessionAndSprint holds a session and a sprint.. because a Java method can't return two values
func (*SessionAndSprint) Session ¶ added in v0.38.0
func (ss *SessionAndSprint) Session() *Session
func (*SessionAndSprint) Sprint ¶ added in v0.38.0
func (ss *SessionAndSprint) Sprint() *Sprint
type SessionAssets ¶
type SessionAssets struct {
// contains filtered or unexported fields
}
SessionAssets provides optimized access to assets
func NewSessionAssets ¶
func NewSessionAssets(environment *Environment, source *AssetsSource) (*SessionAssets, error)
NewSessionAssets creates a new session assets
type Sprint ¶
type Sprint struct {
// contains filtered or unexported fields
}
Sprint is an interaction with the engine - i.e. a start or resume of a session
func (*Sprint) Events ¶
func (s *Sprint) Events() *EventSlice
Events returns the events created during this sprint
func (*Sprint) Modifiers ¶
func (s *Sprint) Modifiers() *ModifierSlice
Modifiers returns the modifiers created during this sprint
type StringSlice ¶
type StringSlice struct {
// contains filtered or unexported fields
}
StringSlice wraps a slice of strings
func NewStringSlice ¶
func NewStringSlice(capacity int) *StringSlice
NewStringSlice creates a new string list
func (*StringSlice) Get ¶
func (l *StringSlice) Get(index int) string
Get returns the string at the given index
func (*StringSlice) Length ¶
func (l *StringSlice) Length() int
Length gets the length of this slice
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger represents something which can initiate a session
func NewManualTrigger ¶
func NewManualTrigger(environment *Environment, contact *Contact, flow *FlowReference) *Trigger
NewManualTrigger creates a new manual trigger