def presign.go
bend-kit-sigv4@0.11.0.1 · sigv4.bend:397
import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4
import Base
397def presign.go(+creds: Credentials, +region: String, +service: String, +date: String, +method: String, +path: String, +q: String, +host: String, +expires: U32) -> IO(Result<&1, &1, U32 & String, String>):
398 Credentials{+access, +secret, +token} = creds
399 +cq = presign.query(access, token, scope(date, region, service), date, expires, q)
400 do IO<Result<&1, &1, U32 & String, String>>:
401 s : Result<&1, &1, U32 & String, String> <- signature(secret, date, region, service, canonical(service, method, path, cq, [("host", host)], "UNSIGNED-PAYLOAD"))
402 return presign.of(s, cq)