permissionsToActions method
Convert a list of permissions to gRPC actions.
Implementation
@override
List<$p.Action> permissionsToActions(List<QueuePermission> permissions) {
List<$p.Action> actions = permissions.fold(
[],
(actions, permission) => switch (permission) {
QueuePermission.enqueue => [
...actions,
$p.Action.QueueEnqueue,
],
QueuePermission.dequeue => [...actions, $p.Action.QueueDequeue],
});
return actions;
}