Documentation ¶
Index ¶
- Variables
- func Clone(data []byte, depMapping map[uuids.UUID]uuids.UUID) ([]byte, error)
- func MigrateToLatest(data []byte, cfg *Config) ([]byte, error)
- func MigrateToVersion(data []byte, to *semver.Version, cfg *Config) ([]byte, error)
- func Registered() map[*semver.Version]MigrationFunc
- type Action
- type Config
- type Flow
- type Header13
- type Localization
- type MigrationFunc
- type Node
- type Router
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = &Config{}
Functions ¶
func Clone ¶ added in v0.63.0
Clone clones the given flow definition by replacing all UUIDs using the provided mapping and generating new random UUIDs if they aren't in the mapping
func MigrateToLatest ¶
MigrateToLatest migrates the given flow definition to the latest version
func MigrateToVersion ¶
MigrateToVersion migrates the given flow definition to the given version
func Registered ¶
func Registered() map[*semver.Version]MigrationFunc
Registered gets all registered migrations
Types ¶
type Config ¶
type Config struct {
BaseMediaURL string
}
Config configures how flow migrations are handled
type Flow ¶
Flow holds a flow definition
func Migrate13_1 ¶
Migrate13_1 adds a `uuid` property to templating objects in [action:send_msg] actions.
@version 13_1 "13.1"
func Migrate13_2 ¶ added in v0.179.0
Migrate13_2 replaces `base` as a flow language with `und` which indicates text with undetermined language in the ISO-639-3 standard.
@version 13_2 "13.2"
func (Flow) Localization ¶ added in v0.179.0
func (f Flow) Localization() Localization
Localization returns the localization of this flow
type Header13 ¶
type Header13 struct { UUID assets.FlowUUID `json:"uuid" validate:"required,uuid4"` Name string `json:"name"` SpecVersion *semver.Version `json:"spec_version" validate:"required"` }
Header13 is the set of fields common to all 13+ flow spec versions
type Localization ¶ added in v0.179.0
type MigrationFunc ¶
MigrationFunc is a function that can migrate a flow definition from one version to another