Skip to content

Commit

Permalink
TUN-4644: Add tunnel metadata field to cloudflare-rs (#155)
Browse files Browse the repository at this point in the history
Co-authored-by: Rishabh Bector <[email protected]>
  • Loading branch information
rishabh-bector and Rishabh Bector authored Jun 29, 2021
1 parent 6b08be1 commit 4c1e636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cloudflare/src/endpoints/argo_tunnel/create_tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ impl<'a> Endpoint<Tunnel, (), Params<'a>> for CreateTunnel<'a> {
}

/// Params for creating a Named Argo Tunnel
#[serde_with::skip_serializing_none]
#[derive(Serialize, Clone, Debug)]
pub struct Params<'a> {
/// The name for the Tunnel to be created. It must be unique within the account.
Expand All @@ -34,4 +35,6 @@ pub struct Params<'a> {
/// encoded into JSON as a base64 String. This secret is necessary to run the tunnel.
#[serde(serialize_with = "serialize_base64_str")]
pub tunnel_secret: &'a Vec<u8>,
/// Arbitrary metadata for the tunnel.
pub metadata: Option<serde_json::Value>,
}
1 change: 1 addition & 0 deletions cloudflare/src/endpoints/argo_tunnel/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub struct Tunnel {
pub deleted_at: Option<DateTime<Utc>>,
pub name: String,
pub connections: Vec<ActiveConnection>,
pub metadata: serde_json::Value,
}

/// An active connection for a Named Argo Tunnel.
Expand Down

0 comments on commit 4c1e636

Please sign in to comment.