This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use async_std; | |
use surf::get; | |
pub enum Authorization { | |
Basic(String), | |
Bearer(String), | |
} | |
impl Authorization { | |
pub fn basic(username: &str, password: &str) -> Self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { pipeline } from 'stream'; | |
import { promisify } from 'util'; | |
const pipelineAsync = promisify(pipeline); | |
import * as express from 'express'; | |
import * as ash from 'express-async-handler'; | |
import * as uuid from 'uuid/v4'; | |
import * as cacache from 'cacache'; | |
const CACHE_PATH = "/tmp/oada-cache"; // This should come from the config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "async-std-tokio-postgres" | |
version = "0.1.0" | |
authors = ["Andrew Balmos <andrew@balmos.org>"] | |
edition = "2018" | |
[dependencies] | |
tokio-postgres = { version = "0.5.0-alpha.1", default-features = false } | |
futures = "0.3.1" | |
futures-util = "0.4.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal from './signal.js' | |
export default (options = {}) => { | |
return (module) => { | |
module.addSignals({ | |
signal: signal(['optional', 'context', 'override']) | |
}); | |
} | |
} |