-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
75 changed files
with
1,681 additions
and
274 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
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,41 @@ | ||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from propan.types import AnyDict | ||
|
||
|
||
class AsyncAPIKafkaChannelBinding(BaseModel): | ||
topic: List[str] | ||
partitions: Optional[int] = None | ||
replicas: Optional[int] = None | ||
# TODO: | ||
# topicConfiguration | ||
version: str = Field( | ||
default="0.4.0", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True | ||
|
||
|
||
class AsyncAPIKafkaOperationBinding(BaseModel): | ||
group_id: Optional[AnyDict] = Field( | ||
default=None, | ||
alias="groupId", | ||
) | ||
client_id: Optional[AnyDict] = Field( | ||
default=None, | ||
alias="clientId", | ||
) | ||
|
||
reply_to: Optional[AnyDict] = Field(default=None, alias="replyTo") | ||
|
||
version: str = Field( | ||
default="0.4.0", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from propan.types import AnyDict | ||
|
||
|
||
class AsyncAPINatsChannelBinding(BaseModel): | ||
subject: str | ||
queue: Optional[str] = None | ||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True | ||
|
||
|
||
class AsyncAPINatsOperationBinding(BaseModel): | ||
reply_to: Optional[AnyDict] = Field(default=None, alias="replyTo") | ||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True |
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,29 @@ | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Field | ||
from typing_extensions import Literal | ||
|
||
from propan.types import AnyDict | ||
|
||
|
||
class AsyncAPIRedisChannelBinding(BaseModel): | ||
channel: str | ||
method: Literal["ssubscribe", "psubscribe", "subscribe"] = "subscribe" | ||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True | ||
|
||
|
||
class AsyncAPIRedisOperationBinding(BaseModel): | ||
reply_to: Optional[AnyDict] = Field(default=None, alias="replyTo") | ||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True |
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,28 @@ | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from propan.types import AnyDict | ||
|
||
|
||
class AsyncAPISQSChannelBinding(BaseModel): | ||
queue: AnyDict | ||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True | ||
|
||
|
||
class AsyncAPISQSOperationBinding(BaseModel): | ||
reply_to: Optional[AnyDict] = Field(default=None, alias="replyTo") | ||
|
||
version: str = Field( | ||
default="custom", | ||
alias="bindingVersion", | ||
) | ||
|
||
class Config: | ||
allow_population_by_field_name = True |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ class AsyncAPIPublish(BaseModel): | |
|
||
|
||
class AsyncAPIChannelParameters(BaseModel): | ||
# TODO | ||
... | ||
|
||
|
||
|
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
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
Oops, something went wrong.