IF Commons GitHub

physical/cloudflare

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-linux-services-profiles FR-008

The DNS provider that the fleet uses, Cloudflare, behind a port: the zone is read page by page and a plan is applied record by record, over HTTPS, with the token given in the header of the request and nowhere else. A token is in no error.

import { cloudflare } from "./cloudflare.ts";
const dns = cloudflare({ zoneId: "z", token: "t", base: "http://127.0.0.1:1" });
typeof dns.list; // "function"

Source: commons/linux-services/src/physical/cloudflare.ts

1 of 6 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

physical.cloudflarefunctionno test imports it
function cloudflare(options: CloudflareOptions): DnsProvider

The Cloudflare provider of a zone.

physical.CloudflareOptionstypeno test imports it
type CloudflareOptions = {
  readonly zoneId: string;
  /** The API token; used in the Authorization header of requests to `base` only. */
  readonly token: string;
  /** The address of the API; Cloudflare's own by default. */
  readonly base?: string;
};

What the Cloudflare provider is made with.

physical.DnsProvidertypeno test imports it
type DnsProvider = {
  readonly list: () => Promise<readonly FoundRecord[]>;
  readonly apply: (plan: DnsPlan) => Promise<void>;
};

The port to the DNS of a name.

cloudflarefunction
function cloudflare(options: CloudflareOptions): DnsProvider

The Cloudflare provider of a zone.

Imported by 10 tests of the run (10 passed, 0 failed): the library's results

CloudflareOptionstypeno test imports it
type CloudflareOptions = {
  readonly zoneId: string;
  /** The API token; used in the Authorization header of requests to `base` only. */
  readonly token: string;
  /** The address of the API; Cloudflare's own by default. */
  readonly base?: string;
};

What the Cloudflare provider is made with.

DnsProvidertypeno test imports it
type DnsProvider = {
  readonly list: () => Promise<readonly FoundRecord[]>;
  readonly apply: (plan: DnsPlan) => Promise<void>;
};

The port to the DNS of a name.

Titles, headings, exports, tables, columns and requirements. Esc closes.