Crates.io | apisix-admin-rs |
lib.rs | apisix-admin-rs |
version | 0.0.3 |
source | src |
created_at | 2024-09-30 02:19:52.533409 |
updated_at | 2024-10-04 03:57:35.667428 |
description | Apisix Admin Client |
homepage | https://apisix.apache.org/ |
repository | https://github.com/Trust1Team/apisix-admin-rs |
max_upload_size | |
id | 1391238 |
size | 203,982 |
This library implements the Apisix Admin interface Reference API.
Apisix API Version: 3.10
Under development!
The script starts two Docker containers, apisix-quickstart and etcd. APISIX uses etcd to save and synchronize configurations. Both the etcd and the APISIX use host Docker network mode. That is, the APISIX can be accessed from local.
curl -sL https://run.api7.ai/apisix/quickstart | sh
cargo build
cargo test
cargo doc --no-deps --open
See the examples folder for a simple example client. To create an SmartID account, download the app:
The example application goes through the following use cases:
The example is using a MOCK ID to simulate the SmartID user.
cargo run --example smart_id_client
Default values are provided and targets the TEST environment of Smart ID. The required environment variables used:
ENV_VAR | DESCRIPTION | REQUIRED |
---|---|---|
HOST_URL | The host address of the Smart ID Service | Y |
RELYING_PARTY_UUID | The UUID assigned to the Relying-party - provided by Smart ID | Y |
RELYING_PARTY_NAME | The unique name assigned to the Relying-Party - provided by Smart ID | Y |
CLIENT_REQ_NETWORK_TIMEOUT_MILLIS | The timeout for the REST client when requesting Smart ID Services | N - default () |
CLIENT_REQ_MAX_ATTEMPTS | The maximum attempts for the REST client retry mechanism | |
CLIENT_REQ_DELAY_SECONDS_BETWEEN_ATTEMPTS | The wait time between consecutive REST client requests | |
ENABLE_POLLING_BY_LIB | Enable automatic polling (when false - polling MUST be implemented by callee |
This library started with basic CRUD operations for Apisix resources mostly used in projects. Is does not (yet) implement the full API, but feel free to contribute.
Read the conventions upon ID Syntax:
This library assumes that all Apisix resources are created with a unique ID. The ID is a string that is unique within the scope of the resource type. The ID is used to identify the resource in the Apisix Admin API. The ID must be a string literal, integer literals are not supported yet (both are possible in Apisix).
Run the examples: In case you need debug logs:
RUST_LOG=info,apisix_admin=debug,apisix_plugins=debug cargo run --example apisix-admin
cargo run --example apisix-admin
cargo run --example apisix-plugins