Generic type representing a guard

Hierarchy

Properties

description: string

A description of what this guard does

enabled: boolean

Whether the guard is currently enabled

name: string

Unique name of this guard

required: boolean

Whether this guard is required

storage: GdprStorage

Where this guard is stored

Methods

  • Disable this guard

    Returns

    this guard

    Memberof

    GdprGuard

    Returns GdprGuard

  • Disable guards of the given type (this guard and sub-guards)

    Returns

    this guard

    Memberof

    GdprGuard

    Parameters

    • type: GdprStorage

      The storage type to enable all guards for

    Returns GdprGuard

  • Enable this guard

    Returns

    this guard

    Memberof

    GdprGuard

    Returns GdprGuard

  • Enable guards of the given type (this guard and sub-guards)

    Returns

    this guard

    Memberof

    GdprGuard

    Parameters

    • type: GdprStorage

      The storage type to enable all guards for

    Returns GdprGuard

  • Determine whether or not a guard is enabled

    Memberof

    GdprGuard

    Parameters

    • name: string

      The name of the guard to look for

    Returns boolean

  • Make this guard required

    Returns

    this guard

    Memberof

    GdprGuard

    Returns GdprGuard

  • Toggle the enabled state of this guard

    Returns

    this guard

    Memberof

    GdprGuard

    Returns GdprGuard

  • Toggle guards of the given type (this guard and sub-guards)

    Returns

    this guard

    Memberof

    GdprGuard

    Parameters

    • type: GdprStorage

      The storage type to enable all guards for

    Returns GdprGuard