1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00
thatmattlove-hyperglass/hyperglass/plugins/_input.py
2021-09-12 18:27:33 -07:00

21 lines
498 B
Python

"""Input validation plugins."""
# Standard Library
from typing import TYPE_CHECKING, Union
# Local
from ._base import DirectivePlugin
if TYPE_CHECKING:
# Project
from hyperglass.models.api.query import Query
InputPluginReturn = Union[None, bool]
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