clan-core/pkgs/clan-cli/clan_cli/facts/secret_modules/__init__.py
lassulus f16667e25a
All checks were successful
checks / check-links (pull_request) Successful in 14s
checks / checks (pull_request) Successful in 33s
checks / checks-impure (pull_request) Successful in 1m49s
refactor secrets & facts -> secret_facts & public_facts
2024-03-23 05:46:54 +01:00

32 lines
678 B
Python

from abc import ABC, abstractmethod
from pathlib import Path
from clan_cli.machines.machines import Machine
class SecretStoreBase(ABC):
@abstractmethod
def __init__(self, machine: Machine) -> None:
pass
@abstractmethod
def set(
self, service: str, name: str, value: bytes, groups: list[str]
) -> Path | None:
pass
@abstractmethod
def get(self, service: str, name: str) -> bytes:
pass
@abstractmethod
def exists(self, service: str, name: str) -> bool:
pass
def update_check(self) -> bool:
return False
@abstractmethod
def upload(self, output_dir: Path) -> None:
pass