15 lines
553 B
Python
15 lines
553 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')
|
|
host = Attribute('the database host')
|
|
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"""
|