Benign github Download

dfinity/cloudflare-rs

Basename is uppercase README.mdGitHub Actions workflow definition path

Evidence

GitHub Actions push workflow trigger rust.yml · lines 1–19
1name: Test cloudflare-rs
2
3on: [push, pull_request]
4
5jobs:
⋯10 lines
16 rust-version: ${{ matrix.rust }}
17 - uses: actions/checkout@master
18 - name: Run tests
19 run: cargo test --verbose
At least four Markdown-style heading lines CONTRIBUTING.md · lines 6–18
6:9… ating the Framework" or "Adding New Endpoints" sections below.
7
8## Pull Requests
9
10Every PR should have a corresponding issue, and the issue number should appear in the PR's
11description and commit message.
12
13PRs should be squashed to one commit before merging.
14
15## Updating the Framework
16
17This library includes both async and blocking API clients. The `ApiClient` trait covers blocking
18requests, and is implemented …
imports std::net::IpAddr main.rs · lines 1–34
1#![forbid(unsafe_code)]
2
3use clap::{Arg, Command};
4use cloudflare::framework::async_api::Client as AsyncClient;
5use cloudflare::framework::{async_api, auth::Credentials, Environment, HttpApiClientConfig};
6use std::fmt::Display;
7use std::net::{IpAddr, Ipv4Addr};
8
9async fn tests(api_client: &AsyncClient, account_id: &str) -> anyhow::Result<()> {
10 test_lb_pool(api_client, account_id).await?;
11 println!("Tests passed");
12 Ok(())
13}
14
15async fn test_lb_pool(api_client: &AsyncClient, account_identifier: &str) -> anyhow::Result<()> {
16 use cloudflare::endpoints::load_balancing::*;
17
18 // Create a pool
19 let origins = vec![
20 Origin {
21 name: "test-origin".to_owned(),
22 address: IpAddr::V4(Ipv4Addr::new(152, 122, 3, 1)),
23 enabled: true,
24 weight: 1.0,
25 },
26 Origin {
27 name: "test-origin-2".to_owned(),
28 address: IpAddr::V4(Ipv4Addr::new(152, 122, 3, 2)),
29 enabled: true,
30 weight: 1.0,
⋯4 lines
References the Tokio async runtime namespace main.rs · lines 71–83
71 let pool_details = pool_details?.result;
72 assert_eq!(pool, pool_details);
73
74 Ok(())
75}
76
77#[tokio::main]
78async fn main() -> anyhow::Result<()> {
79 let cli =
80 Command::new("Cloudflare-rs E2E tests")
81 .version("0.0")
82 .author("Argo Tunnel team <[email protected]>")
83 .about("Is …
Secret-data term token main.rs · lines 85–95
85:24… l")
86 .help("Email address associated with your account")
87 .requires("auth-key"))
88 .arg(Arg::new("auth-key")
89 .long("auth-key")
90 .env("CF_RS_AUTH_KEY")
91 .help("API key generated on the \"My Account\" page")
92 .requires("email"))
93 .arg(Arg::new("auth-token")
94 .long("auth-token")
95 .env("CF_RS_AUTH_ …

Showing the top 5 files — 3 more files (17 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.