forked from OpenToAllCTF/OTA-Challenge-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for private CTF channels
Fix issue OpenToAllCTF#125. Add util method for parsing args for options.
- Loading branch information
Showing
6 changed files
with
67 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
#### abstract DAO describes the serializations supported by the backend | ||
|
||
```python | ||
class CtfDao: | ||
pass | ||
|
||
class ChallengeDao: | ||
pass | ||
``` | ||
|
||
#### concrete DAO implement serialization described by abstract DAO | ||
|
||
|
||
#### application receives handle to backend at startup | ||
|
||
|
||
#### ctf/challenge objects are initialized with instance of concrete dao | ||
|
||
#### backend receives serialized DAO and persists it | ||
┌───> PostgreSQL | ||
+---------+ ├───> Redis | ||
| Backend |>────────┼───> Pickle | ||
+---------+ └───> ... | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Backend: | ||
def __init__(self): | ||
pass | ||
|
||
def create(self): | ||
pass | ||
|
||
def read(self): | ||
pass | ||
|
||
def update(self): | ||
pass | ||
|
||
def destroy(self): | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Pickle(Backend): | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Redis(Backend): | ||
pass |
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