pyceo/ceo_common/interfaces/IDatabaseService.py

17 lines
598 B
Python

from zope.interface import Attribute, Interface
from .IUser import IUser
class IDatabaseService(Interface):
"""Interface to create databases for users."""
type = Attribute('the type of databases that will be created')
auth_username = Attribute('username to a privileged user on the database host')
auth_password = Attribute('password to a privileged user on the database host')
def create_db(username: str) -> str:
"""try to create a database and user and return its password"""
def delete_db(username: str):
"""remove user and delete their database"""