Documentation ¶
Index ¶
- func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, ...) bool
- func AssertXEqual(t *testing.T, expected types.XValue, actual types.XValue, ...) bool
- func CreateSessionAssets(assetsJSON json.RawMessage, testServerURL string) (flows.SessionAssets, error)
- func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
- func CreateTestVoiceSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
- func JSONReplace(data json.RawMessage, path []string, value json.RawMessage) json.RawMessage
- func LoadFlowFromAssets(path string, uuid assets.FlowUUID) (flows.Flow, error)
- func LoadSessionAssets(path string) (flows.SessionAssets, error)
- func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, ...) *flows.Channel
- func NewField(key string, name string, valueType assets.FieldType) *flows.Field
- func NewGroup(name string, query string) *flows.Group
- func NewTelChannel(name string, address string, roles []assets.ChannelRole, ...) *flows.Channel
- func NewTestHTTPServer(port int) *httptest.Server
- func NormalizeJSON(data json.RawMessage) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqualJSON ¶ added in v0.23.0
func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, msgArgs ...interface{}) bool
AssertEqualJSON checks two JSON strings for equality
func AssertXEqual ¶ added in v0.33.8
func AssertXEqual(t *testing.T, expected types.XValue, actual types.XValue, msgAndArgs ...interface{}) bool
AssertEqual is equivalent to assert.Equal for two XValue instances
func CreateSessionAssets ¶ added in v0.38.0
func CreateSessionAssets(assetsJSON json.RawMessage, testServerURL string) (flows.SessionAssets, error)
CreateSessionAssets creates assets from given JSON
func CreateTestSession ¶
func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
CreateTestSession creates a standard example session for testing
func CreateTestVoiceSession ¶ added in v0.24.0
func CreateTestVoiceSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)
CreateTestVoiceSession creates a standard example session for testing voice flows and actions
func JSONReplace ¶ added in v0.39.0
func JSONReplace(data json.RawMessage, path []string, value json.RawMessage) json.RawMessage
JSONReplace replaces a node in JSON
func LoadFlowFromAssets ¶ added in v0.29.0
func LoadSessionAssets ¶ added in v0.25.0
func LoadSessionAssets(path string) (flows.SessionAssets, error)
LoadSessionAssets loads a session assets instance from a static JSON file
func NewChannel ¶ added in v0.15.0
func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, parent *assets.ChannelReference) *flows.Channel
func NewTelChannel ¶ added in v0.15.0
func NewTelChannel(name string, address string, roles []assets.ChannelRole, parent *assets.ChannelReference, country string, matchPrefixes []string) *flows.Channel
func NewTestHTTPServer ¶
NewTestHTTPServer sets up a mock server for webhook actions
func NormalizeJSON ¶ added in v0.23.0
func NormalizeJSON(data json.RawMessage) ([]byte, error)
NormalizeJSON re-formats the given JSON
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.