Documentation
¶
Overview ¶
Package mutations provides shared helpers for extracting, normalizing, and cloning mutation field change data across eventing and workflow trigger contexts.
Index ¶
- func BuildProposedChanges(source ProposedChangeSource, changedFields []string) map[string]any
- func ChangedAndClearedFields(source FieldChangeSource) (changed []string, cleared []string)
- func CloneAnyMap(values map[string]any) map[string]any
- func CloneStringSliceMap(values map[string][]string) map[string][]string
- func NormalizeStrings(values []string) []string
- type ChangeSet
- type FieldChangeSource
- type ProposedChangeSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProposedChanges ¶
func BuildProposedChanges(source ProposedChangeSource, changedFields []string) map[string]any
BuildProposedChanges materializes mutation values including explicit clears
func ChangedAndClearedFields ¶
func ChangedAndClearedFields(source FieldChangeSource) (changed []string, cleared []string)
ChangedAndClearedFields returns normalized changed and cleared field lists from a mutation source
func CloneAnyMap ¶
CloneAnyMap deep-copies map values while dropping blank keys
func CloneStringSliceMap ¶
CloneStringSliceMap deep-copies map values while dropping blank keys
func NormalizeStrings ¶
NormalizeStrings trims, deduplicates, and drops empty string values
Types ¶
type ChangeSet ¶
type ChangeSet struct {
// ChangedFields captures updated/cleared fields for the mutation
ChangedFields []string
// ChangedEdges captures changed edge names
ChangedEdges []string
// AddedIDs captures edge IDs added by edge name
AddedIDs map[string][]string
// RemovedIDs captures edge IDs removed by edge name
RemovedIDs map[string][]string
// ProposedChanges captures field-level proposed values
ProposedChanges map[string]any
}
ChangeSet captures mutation deltas shared across eventing and workflow trigger contexts
type FieldChangeSource ¶
FieldChangeSource captures the mutation accessors needed to derive changed and cleared field lists