oci_cfg

Crates.iooci_cfg
lib.rsoci_cfg
version0.2.0
sourcesrc
created_at2024-02-13 13:30:44.981339
updated_at2024-02-13 13:30:44.981339
descriptionA small library for parsing and writing OCI configuration files
homepage
repository
max_upload_size
id1138489
size30,487
Torsten Boettjer (torstenboettjer)

documentation

README

OCI Config Writer

This small library enables engineers to create an Oracle Cloud Infrastructure (OCI) config file in Rust. It checks, whether a file already exists, before it writes the config into the sub-directory within the user's home. It checks the permissions before adding content. To instantiate the library it should be addressed as oci_cfg, this name is used within the modules. Documentation created using the make doc command.

More information about the config file itself can be found in the official documentation under: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm

Example

use oci_cfg::{profile, credentials, report};

fn main() {
   profile(
    "ocid1.user.oc1..aaaaaaaaxxxxxx",
    "ocid1.fingerprint.oc1..aaaaaaaaxxxxxx",
    "path/to/private/key",
    "ocid1.tenancy.oc1..aaaaaaaaxxxxxx",
    "IAD"
   );
   credentials(
    "ocid1.user.oc1..aaaaaaaaxxxxxx",
    "ocid1.fingerprint.oc1..aaaaaaaaxxxxxx",
    "path/to/private/key",
    "passphrase"
   );
   content();
}
Commit count: 0

cargo fmt