15 lines
499 B
Python
15 lines
499 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 database')
|
|
host = Attribute('the database address')
|
|
auth_username = Attribute('username of user creating connection')
|
|
auth_password = Attribute('password of user creating connection')
|
|
|
|
def create_db(username: str) -> str:
|
|
"""create a database for user and return its password"""
|