def auth.done

bend-kit-postgres@0.3.0.0 · postgres.bend:241

import bend-kit-postgres@0.3.0.0/postgres.bend as Postgres
import Base
import bend-kit-postgres@0.3.0.0/codec.bend as Codec

241# AuthenticationOk, after a password or the SCRAM exchange.
242def auth.done(r: Result<&1, &1, Failure, Conn & Codec.Back>) -> IO(Result<&1, &1, Failure, Conn>):
243  match r:
244    case Fail{e}:
245      IO.pure(Result<&1, &1, Failure, Conn>, Fail{e})
246    case Done{(c, m)}:
247      match m:
248        case Codec.AuthOk{}:
249          ready(c)
250        case Codec.ErrorResponse{fs}:
251          reject(Conn, c, fs)
252        case _:
253          abort(Conn, c, Malformed{})

Uses (11)

Used by (2)