1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

22 lines
498 B
Python
Raw Normal View History

"""Input validation plugins."""
# Standard Library
from typing import TYPE_CHECKING, Union
# Local
2021-09-12 18:27:33 -07:00
from ._base import DirectivePlugin
if TYPE_CHECKING:
# Project
from hyperglass.models.api.query import Query
InputPluginReturn = Union[None, bool]
2021-09-12 18:27:33 -07:00
class InputPlugin(DirectivePlugin):
"""Plugin to validate user input prior to running commands."""
def validate(self, query: "Query") -> InputPluginReturn:
"""Validate input from hyperglass UI/API."""
return None