-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(routing): add domain type for Routing id (#5733)
Co-authored-by: Sanchith Hegde <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b66f910
commit e939db2
Showing
14 changed files
with
93 additions
and
67 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
crate::id_type!( | ||
RoutingId, | ||
" A type for routing_id that can be used for routing ids" | ||
); | ||
|
||
crate::impl_id_type_methods!(RoutingId, "routing_id"); | ||
|
||
// This is to display the `RoutingId` as RoutingId(abcd) | ||
crate::impl_debug_id_type!(RoutingId); | ||
crate::impl_try_from_cow_str_id_type!(RoutingId, "routing_id"); | ||
|
||
crate::impl_generate_id_id_type!(RoutingId, "routing"); | ||
crate::impl_serializable_secret_id_type!(RoutingId); | ||
crate::impl_queryable_id_type!(RoutingId); | ||
crate::impl_to_sql_from_sql_id_type!(RoutingId); | ||
|
||
impl crate::events::ApiEventMetric for RoutingId { | ||
fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> { | ||
Some(crate::events::ApiEventsType::Routing) | ||
} | ||
} |
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
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.