utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: MPL-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignmentToTags

func AssignmentToTags(a schema.Assignment) (tags []goarSchema.Tag, err error)

func BaseToTags

func BaseToTags(b schema.Base) []goarSchema.Tag

func CheckDuplicateTag

func CheckDuplicateTag(tags []goarSchema.Tag) error

func CheckpointToTags

func CheckpointToTags(c schema.Checkpoint) (tags []goarSchema.Tag, err error)

func Decode

func Decode(item goarSchema.BundleItem) (pid, accid, fromProcess string, instance interface{}, err error)

func DecodeItemToAssignment

func DecodeItemToAssignment(item goarSchema.BundleItem) (assign schema.Assignment, err error)

func DecodeItemToMessage

func DecodeItemToMessage(item goarSchema.BundleItem) (msg schema.Message, err error)

func DecodeItemToProcess

func DecodeItemToProcess(item goarSchema.BundleItem) (proc schema.Process, err error)

func GetTagsValue

func GetTagsValue(key string, tags []goarSchema.Tag) (t string)

func GetTagsValueByDefault

func GetTagsValueByDefault(key string, tags []goarSchema.Tag, defaultValue string) (t string)

func GetType

func GetType(item goarSchema.BundleItem) string

func MergeTags

func MergeTags(tags1, tags2 []goarSchema.Tag) []goarSchema.Tag

mergeTags combines two slices of tags while avoiding duplicates. If a tag name exists in both slices, the value from tags1 is preserved. Parameters:

  • tags1: The primary slice of tags that takes precedence
  • tags2: The secondary slice of tags to merge

Returns:

  • A new slice containing merged tags with no duplicate tag names

func MessageToTags

func MessageToTags(msg schema.Message) (tags []goarSchema.Tag, err error)

func ModuleToTags

func ModuleToTags(m schema.Module) (tags []goarSchema.Tag, err error)

func ProcessToTags

func ProcessToTags(p schema.Process) (tags []goarSchema.Tag, err error)

func TagsToAssignment

func TagsToAssignment(tags []goarSchema.Tag) (a schema.Assignment, err error)

func TagsToBase

func TagsToBase(tags []goarSchema.Tag) (b schema.Base)

func TagsToCheckpoint

func TagsToCheckpoint(tags []goarSchema.Tag) (c schema.Assignment, err error)

func TagsToMessage

func TagsToMessage(tags []goarSchema.Tag) (m schema.Message, err error)

func TagsToModule

func TagsToModule(t []goarSchema.Tag) (m schema.Module, err error)

func TagsToParams

func TagsToParams(tags []goarSchema.Tag) (params map[string]string, err error)

func TagsToProcess

func TagsToProcess(tags []goarSchema.Tag) (p schema.Process, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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