expressions

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextTopLevels = []string{"channel", "child", "contact", "date", "extra", "flow", "parent", "step"}

ContextTopLevels are the allowed top-level identifiers in legacy expressions, i.e. @contact.bar is valid but @foo.bar isn't

Functions

func MigrateContextReference

func MigrateContextReference(path string, rawDates bool) string

MigrateContextReference migrates a context reference in a legacy expression

func MigrateStringLiteral

func MigrateStringLiteral(s string) string

MigrateStringLiteral migrates a string literal (legacy expressions use Excel "" escaping)

func MigrateTemplate

func MigrateTemplate(template string, options *MigrateOptions) (string, error)

MigrateTemplate will take a legacy expression and translate it to the new syntax

Types

type MigrateOptions

type MigrateOptions struct {
	DefaultToSelf bool
	URLEncode     bool
	RawDates      bool
}

MigrateOptions are options for how expressions are migrated

Jump to

Keyboard shortcuts

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