openwhisk_rust/api/
common.rs

1use serde::{Deserialize, Serialize};
2
3/// These Static variables represents action,triggers,rules and namespaces endpoints
4pub static ACTION_ENDPOINT: &str = "actions";
5pub static TRIGGERS_ENDPOINT: &str = "triggers";
6pub static RULES_ENDPOINT: &str = "rules";
7pub static NAMESPACE_ENDPOINT: &str = "namespaces";
8
9#[derive(Debug, Deserialize, Serialize, Clone, Default, PartialEq)]
10pub struct Limits {
11    /// Timeout is the range set for per action in milliseconds
12    #[serde(default)]
13    pub timeout: i64,
14    /// Memory is the range set per action in MB
15    #[serde(default)]
16    pub memory: i64,
17    /// The size for the log file
18    #[serde(default)]
19    pub logsize: i64,
20    /// Number of activations that can be processed at once
21    #[serde(default)]
22    pub concurrency: i64,
23}
24
25/// Enum of HTTP Methods
26pub enum HttpMethods {
27    GET,
28    PUT,
29    POST,
30    DELETE,
31}