-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
derive the Default trait for all APIs
Modify `update.sh` to generate APIs which derive the `Default` trait: * Update the kopium command in `update.sh` so that all APIs auto-derive the Default trait. * Use the enum default generator tool to generate `Default` trait impls for all Gateway API enums. Signed-off-by: Sanskar Jaiswal <[email protected]>
- Loading branch information
Showing
18 changed files
with
345 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
use super::httproutes::{ | ||
HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType, HTTPRouteRulesBackendRefsFiltersType, | ||
HTTPRouteRulesBackendRefsFiltersUrlRewritePathType, | ||
HTTPRouteRulesFiltersRequestRedirectPathType, HTTPRouteRulesFiltersType, | ||
HTTPRouteRulesFiltersUrlRewritePathType, | ||
}; | ||
|
||
use super::grpcroutes::{GRPCRouteRulesBackendRefsFiltersType, GRPCRouteRulesFiltersType}; | ||
|
||
impl Default for HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType { | ||
fn default() -> Self { | ||
HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType::ReplaceFullPath | ||
} | ||
} | ||
|
||
impl Default for HTTPRouteRulesBackendRefsFiltersUrlRewritePathType { | ||
fn default() -> Self { | ||
HTTPRouteRulesBackendRefsFiltersUrlRewritePathType::ReplaceFullPath | ||
} | ||
} | ||
|
||
impl Default for GRPCRouteRulesFiltersType { | ||
fn default() -> Self { | ||
GRPCRouteRulesFiltersType::RequestHeaderModifier | ||
} | ||
} | ||
|
||
impl Default for HTTPRouteRulesFiltersUrlRewritePathType { | ||
fn default() -> Self { | ||
HTTPRouteRulesFiltersUrlRewritePathType::ReplaceFullPath | ||
} | ||
} | ||
|
||
impl Default for GRPCRouteRulesBackendRefsFiltersType { | ||
fn default() -> Self { | ||
GRPCRouteRulesBackendRefsFiltersType::RequestHeaderModifier | ||
} | ||
} | ||
|
||
impl Default for HTTPRouteRulesBackendRefsFiltersType { | ||
fn default() -> Self { | ||
HTTPRouteRulesBackendRefsFiltersType::RequestHeaderModifier | ||
} | ||
} | ||
|
||
impl Default for HTTPRouteRulesFiltersType { | ||
fn default() -> Self { | ||
HTTPRouteRulesFiltersType::RequestHeaderModifier | ||
} | ||
} | ||
|
||
impl Default for HTTPRouteRulesFiltersRequestRedirectPathType { | ||
fn default() -> Self { | ||
HTTPRouteRulesFiltersRequestRedirectPathType::ReplaceFullPath | ||
} | ||
} |
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.