2 releases
new 0.3.1 | Dec 20, 2024 |
---|---|
0.3.0 | Dec 20, 2024 |
#5 in #api-secret
240KB
3K
SLoC
DSH resource management API client
Environment variables
variable | description |
---|---|
DSH_API_PLATFORM |
Target platform on which the tenant's environment lives.
|
DSH_API_TENANT |
Tenant id for the target tenant. The target tenant is the tenant whose resources will be managed via the api. |
DSH_API_SECRET_[platform]_[tenant] |
Secret api token for the target tenant.
The placeholders [platform] and [tenant]
need to be substituted with the platform name and the tenant name in all capitals,
with hyphens (- ) replaced by underscores (_ ).E.g. if the platform is nplz and the tenant name is
greenbox-dev , the environment variable must be
DSH_API_SECRET_NPLZ_GREENBOX_DEV .
|
DSH_API_GUID_[tenant] |
Group id and user id for the target tenant.
The placeholder [tenant] needs to be substituted
with the tenant name in all capitals, with hyphens (- )
replaced by underscores (_ ).E.g. if the tenant name is greenbox-dev , the environment variable must be
DSH_API_GUID_GREENBOX_DEV .
|
E.g., for tenant greenbox-dev
(gid/uid 1903
) at platform nplz
, use:
> export DSH_API_PLATFORM=nplz && \
export DSH_API_TENANT=greenbox-dev && \
export DSH_API_GUID_GREENBOX_DEV=1903:1903 && \
export DSH_API_SECRET_NPLZ_GREENBOX_DEV=..
Features
The following features are defined:
feature | description |
---|---|
actual |
When this feature is enabled the library will include all the "actual" method versions of the REST API. By default, these methods will not be included. |
generated |
When this feature is enabled the library will re-export the functions
generated from the REST API. By default, these methods will not be re-exported.
Note that the generated functions can also be added explicitly
to the dependencies section in Cargo.toml .
|
Coding guidelines
Before pushing code to github, make sure that you adhere to the code formatting defined in
rustfmt.toml
and that you have run the clippy
linter. The following commands should
return without any remarks:
> cargo +nightly fmt --check
> cargo clippy
Consider configuring your IDE to automatically apply the formatting rules when saving a file.
Dependencies
~11–29MB
~389K SLoC