guardContent function

String guardContent(
  1. ServerLifecycleComponent component,
  2. String formatter(
    1. Spec
    )
)

Implementation

String guardContent(
  ServerLifecycleComponent component,
  String Function(Spec) formatter,
) {
  return sequentialComponentContent(
    component,
    formatter,
    className: component.guardClass.className,
    interfaceName: (Guard).name,
    resultType: (GuardResult).name,
    methodName: 'protect',
    methods: component.guards,
    listName: 'guards',
    itemName: 'guard',
    shortCircuitOn: 'isBlock',
    fallthrough: 'pass',
  );
}