-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
from .meta_enum import MetaEnum | ||
from cellpack.autopack.AWSHandler import AWSHandler | ||
from cellpack.autopack.FirebaseHandler import FirebaseHandler | ||
|
||
|
||
class DATABASE_IDS(MetaEnum): | ||
FIREBASE = "firebase" | ||
GITHUB = "github" | ||
AWS = "aws" | ||
|
||
@classmethod | ||
def with_colon(cls): | ||
return [f"{ele}:" for ele in cls.values()] | ||
|
||
@classmethod | ||
def handlers(cls): | ||
def create_aws_handler(bucket_name, sub_folder_name, region_name): | ||
return AWSHandler( | ||
bucket_name=bucket_name, | ||
sub_folder_name=sub_folder_name, | ||
region_name=region_name, | ||
) | ||
|
||
handlers_dict = { | ||
cls.FIREBASE: FirebaseHandler(), | ||
cls.AWS: create_aws_handler, | ||
} | ||
return handlers_dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters