Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

readSecrets

import { readSecrets } from "https://git.sr.ht/~ruivieira/deno-experiments/blob/master/misc/secrets.ts";

Reads secrets from a JSON file from ~/.config/<topic>/<file>. As an example, const s = readSecrets<any>("myapp", "keys.json") will read the values into a JSON object from ~/.config/myapp/keys.json. The values can then be extracted with s.key1, s.key2, etc.

function readSecrets<T>(topic: string, file?): T;
§
readSecrets<T>(topic: string, file?): T
[src]

§Type Parameters

§Parameters

§
topic: string
[src]

The secret's topic

§
file? optional
[src]

§Return Type