base_trigger.py 542 B

123456789101112131415161718192021222324252627282930313233
  1. # coding=utf-8
  2. """
  3. @project: MaxKB
  4. @Author:虎虎
  5. @file: Trigger.py
  6. @date:2026/1/14 18:45
  7. @desc:
  8. """
  9. from abc import ABC, abstractmethod
  10. class BaseTrigger(ABC):
  11. """
  12. 触发器抽象
  13. """
  14. @abstractmethod
  15. def support(self, trigger, **kwargs):
  16. pass
  17. @abstractmethod
  18. def deploy(self, trigger, **kwargs):
  19. pass
  20. @abstractmethod
  21. def undeploy(self, trigger, **kwargs):
  22. pass
  23. @staticmethod
  24. @abstractmethod
  25. def execute(trigger, **kwargs):
  26. pass