Git Product home page Git Product logo

clevercloud-sdk-rust's Introduction

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 under development, you can use it, but it may have bugs or unimplemented features.

Installation

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

clevercloud-sdk = { version = "^0.11.1", 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, v2::myself::{self, Myself}};

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
    let client = Client::from(Credentials {
        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
trace Use tracing crate to expose traces
tokio Use tokio crate as back-end for tracing crate
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

clevercloud-sdk-rust's People

Contributors

edoriandark avatar florentindubois avatar lostinbrittany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clevercloud-sdk-rust's Issues

License

I am not sure, if AGPL is really a good license for an SDK.
I would assume, that a more permissive license like GPL would lead to more users.

Query deployment status

After a new version is published, the old version is still running for some minutes.
My application needs to know, if it is the old version, so it can stop making requests to other services.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.