openwhisk_macro

Crates.ioopenwhisk_macro
lib.rsopenwhisk_macro
version0.1.6
created_at2022-06-02 05:26:18.763564+00
updated_at2022-07-21 10:23:16.044062+00
descriptionDerive Macro for OpenWhisk Rust Client
homepage
repositoryhttps://github.com/HugoByte/aurras/workflow/openwhisk_macro
max_upload_size
id598673
size5,978
Shreyas S Bhat (shreyasbhat0)

documentation

https://docs.rs/openwhisk_macro/latest

README

Openwhisk Rust Macro

Description

This project Openwhisk Rust Macro is a Rust derive macro which implements necessary methods to interact with Openwhisk-rust library to invoke actions deployed in Openwhisk. The Openwhisk Rust Client library requires Rust to be installed onto your local machine.

Setup

Add following libraries.

openwhisk-rust  = "0.1.2"
openwhisk_macro = "0.1.6" 

In your Cargo.toml file of your rust package.

Then access those libraries by importing.

use openwhisk_macro::OpenWhisk;
use openwhisk-rust::*;

Usage

Creates necessary methods to invoke Openwhisk Actions.

#[derive(OpenWhisk)]
#[AuthKey = "Your auth key"]
#[ApiHost = "Host api endpoint url"]
#[Insecure = "true/false"]
#[Namespace = "Your namespace name"]

// Note: Action should be deployed prior,before accessing it. 
pub struct AnyAction {
action_name: String,
// *some fileds //
}

References

License

Licensed under Apache-2.0

Commit count: 0

cargo fmt