GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CleverCloud/clevercloud-sdk-rust: A rust client and structures to interact with the Clever-Cloud API.

BranchesTags
Open more actions menu

Latest commit

 

History

237 Commits
237 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples/cleverctl
examples/cleverctl
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
rust-toolchain
rust-toolchain
 
 

Repository files navigation

Clever-Cloud Software Development Kit - Rust edition

crates.io Released API docs Continuous integration

This crate provides structures and a client to interact with the Clever-Cloud API.

Status

This crate is stable and follows Semantic Versioning. The public API tracks the Clever Cloud API; not every endpoint is implemented yet, and contributions are welcome. See CHANGELOG.md for the release history.

Installation

To install this dependency, just add the following line to your Cargo.toml manifest.

clevercloud-sdk = { version = "^1.0.0", features = ["metrics", "jsonschemas"] }

Usage

Below, you will find an example of executing a request to get information about myself.

use std::error::Error;

use clevercloud_sdk::{Client, Credentials, v2::myself::{self, Myself}};

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
    let client = Client::from(Credentials::OAuth1 {
        token: "".to_string(),
        secret: "".to_string(),
        consumer_key: "".to_string(),
        consumer_secret: "".to_string(),
    });

    let _myself: Myself = myself::get(&client).await?;

    Ok(())
}

You could found more examples of how you could use the clevercloud-sdk by looking at the command line example.

Features

name description
tracing Use tracing crate to expose traces
jsonschemas Use schemars to add a derive instruction to generate json schemas representation of structures
logging Use the log facility crate to print logs. Implies oauth10a/logging feature
metrics Expose HTTP metrics through oauth10a crate feature.

Metrics

Below, the exposed metrics gathered by prometheus:

name labels kind description
oauth10a_client_request endpoint: String, method: String, status: Integer Counter number of request on api
oauth10a_client_request_duration endpoint: String, method: String, status: Integer, unit: String Counter duration of request on api

License

See the license.

Getting in touch

  • @FlorentinDUBOIS

About

A rust client and structures to interact with the Clever-Cloud API.

crates.io/crates/clevercloud-sdk

Topics

clevercloudjsonschemasloggingmetricssdk

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity
Custom properties

Stars

11 stars

Watchers

2 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.