Skip to content

PaulmannLighting/mender-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

337 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mender-api

mender-api is a Rust library and CLI application for interacting with the Mender API for device management and software deployments.

Features

  • API client for Mender endpoints
  • Management of devices, groups, releases, deployments, and tags
  • Authentication and session handling
  • CLI for common operations
  • Configuration via file and arguments

Project Structure

  • api/ — Rust library for the Mender API
  • cfg/ — Configuration module
  • cli/ — Command-line application

Installation

git clone https://github.com/PaulmannLighting/mender-api.git
cd mender-api
cargo build --release

Usage

CLI

cargo run --bin mender-api-cli -- <commands> [options]

Library

Add to your Cargo.toml:

mender-api = { path = "./api" }

Import and use the library in your Rust project:

use mender_api::{Client, Login};

#[tokio::main]
async fn main() {
    let client = Client::new("https://mender.example.com");
    let session = client.login("username", "password").await;
    // Use the session to interact with the Mender API.
}

Configuration

Configuration files can be managed in the cfg/ module. See examples in cfg/src/config_file.rs.

Tests

Run tests with:

cargo test

License

See LICENSE for license information.

Contributing

Pull requests and issues are welcome!

About

Rust bindings to access the Mender server API.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages