azure_app_config

Crates.ioazure_app_config
lib.rsazure_app_config
version0.1.1
sourcesrc
created_at2024-04-29 23:22:11.401777
updated_at2024-05-03 21:21:48.769822
descriptionAzure App Configuration REST API Wrapper
homepagehttps://github.com/Pieeer1/Azure-App-Config-Rs.git
repositoryhttps://github.com/Pieeer1/Azure-App-Config-Rs.git
max_upload_size
id1224568
size64,542
Mason Adams (Pieeer1)

documentation

README

Azure App Config

Purpose

This library is a quick wrapper around the azure keyvault REST API to support managed identity configuration setting grabbing.

Usage

Get All Key Values


    let client = Client::new(azure_core::Url::parse(env::var("APPCONFIG_URI").expect("Missing APPCONFIG_URI Env Var").as_str()).unwrap(), azure_identity::create_credential().unwrap());
    let resp = client.get_key_values(None, None, None).await;

Get a Specific Config Value


    let client = Client::new(azure_core::Url::parse(env::var("APPCONFIG_URI").expect("Missing APPCONFIG_URI Env Var").as_str()).unwrap(), azure_identity::create_credential().unwrap());
    let config_setting = client.get_key_value("ExampleConfigSetting", None, Some("Example:"), None).await.unwrap();
    

Get Feature Flags

    let client = Client::new(azure_core::Url::parse(env::var("APPCONFIG_URI").expect("Missing APPCONFIG_URI Env Var").as_str()).unwrap(), azure_identity::create_credential().unwrap());
    let feature_flags = client.get_feature_flags(None).await;

Get Feature Flag Is Enabled or Disabled

    let client = Client::new(azure_core::Url::parse(env::var("APPCONFIG_URI").expect("Missing APPCONFIG_URI Env Var").as_str()).unwrap(), azure_identity::create_credential().unwrap());
    let is_enabled = client.is_feature_enabled("ExampleFeatureFlag", None).await.unwrap();

Also see the Example: Basic Usage

Install

cargo add azure_app_config

Crates.IO

https://crates.io/crates/azure_app_config

Commit count: 12

cargo fmt