mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(router): implement API endpoints for managing API keys (#511)
This commit is contained in:
@ -37,6 +37,16 @@ pub fn which() -> Env {
|
||||
std::env::var(RUN_ENV).map_or_else(|_| default_env, |v| v.parse().unwrap_or(default_env))
|
||||
}
|
||||
|
||||
/// Three letter (lowercase) prefix corresponding to the current environment.
|
||||
/// Either `dev`, `snd` or `prd`.
|
||||
pub fn prefix_for_env() -> &'static str {
|
||||
match which() {
|
||||
Env::Development => "dev",
|
||||
Env::Sandbox => "snd",
|
||||
Env::Production => "prd",
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Base path to look for config and logs directories.
|
||||
/// Application expects to find `./config/` and `./logs/` relative this directories.
|
||||
|
||||
@ -150,6 +150,16 @@ pub enum Flow {
|
||||
IncomingWebhookReceive,
|
||||
/// Validate payment method flow
|
||||
ValidatePaymentMethod,
|
||||
/// API Key create flow
|
||||
ApiKeyCreate,
|
||||
/// API Key retrieve flow
|
||||
ApiKeyRetrieve,
|
||||
/// API Key update flow
|
||||
ApiKeyUpdate,
|
||||
/// API Key revoke flow
|
||||
ApiKeyRevoke,
|
||||
/// API Key list flow
|
||||
ApiKeyList,
|
||||
}
|
||||
|
||||
/// Category of log event.
|
||||
|
||||
Reference in New Issue
Block a user