Skip to main content

TriggerModelsToTriggers

Converts latest-state trigger rows to the list-view proto.

def TriggerModelsToTriggers(
ctx: context.Context,
ms: []*models.Trigger
) - > ([]*triggerpb.Trigger, error)

Converts latest-state trigger rows to the list-view proto.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, typically used for cancellation and deadlines.
ms[]*models.TriggerA slice of trigger model objects representing the latest state of triggers to be converted.

Returns

TypeDescription
([]*triggerpb.Trigger, error)A slice of trigger protocol buffer objects and an error if the unmarshaling of an automation specification fails.