!=[;#"      !None_  postgres-websocketsTOpens a thread that relays messages from the producer thread to the channels forever postgres-websocketsjReads the messages from the producer and relays them to the active listeners in their respective channels. postgres-websockets_Adds a listener to a certain multiplexer's channel. The listener must be a function that takes a 'TChan Message' and perform any IO action. All listeners run in their own thread. The first listener will open the channel, when a listener dies it will check if there acquire any others and close the channel when that's the case.   None_"postgres-websockets0Possible situations encountered with client JWTspostgres-websocketsGiven a secret, a token and a timestamp it validates the claims and returns either an error message or a triple containing channel, mode and claims hashmap.#postgres-websocketsRReceives the JWT secret (from config) and a JWT and returns a map of JWT claims.$postgres-websocketsNInternal helper used to turn JWT ClaimSet into something easier to work with%postgres-websocketsInternal helper to generate HMAC-SHA256. When the jwt key in the config file is a simple string rather than a JWK object, we'll apply this function to it.None_%|postgres-websocketsXA wrapped bytestring that represents a properly escaped and quoted PostgreSQL identifier&postgres-websockets3Given a PgIdentifier returns the wrapped bytestringpostgres-websocketsEGiven a bytestring returns a properly quoted and escaped PgIdentifierpostgres-websocketsRGiven a Hasql Pool, a channel and a message sends a notify command to the databasepostgres-websocketsXGiven a Hasql Connection, a channel and a message sends a notify command to the databasepostgres-websocketsMGiven a Hasql Connection and a channel sends a listen command to the databasepostgres-websocketsOGiven a Hasql Connection and a channel sends a unlisten command to the databasepostgres-websocketsGiven a function that handles notifications and a Hasql connection forks a thread that listens on the database connection and calls the handler everytime a message arrives.VThe message handler passed as first argument needs two parameters channel and payload.None_8[postgres-websocketsReturns a multiplexer from a connection URI, keeps trying to connect in case there is any error. This function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listenerspostgres-websocketsReturns a multiplexer from a connection URI or an error message on the left case This function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listeners'postgres-websocketsReturns a multiplexer from a channel and an IO Connection, listen for different database notifications on the provided channel using the connection produced.tThis function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listenersTo listen on channels *chat*  import Protolude import PostgresWebsockets.HasqlBroadcast import PostgresWebsockets.Broadcast import Hasql.Connection main = do conOrError <- H.acquire "postgres:/ localhosttest_database" let con = either (panic . show) id conOrError :: Connection multi <- newHasqlBroadcaster con onMessage multi "chat" (ch -> forever $ fmap print (atomically $ readTChan ch)   None7_;postgres-websocketsxGiven a secret, a function to fetch the system time, a Hasql Pool and a Multiplexer this will give you a WAI middleware.(  !"#$%&'()*+,-./02postgres-websockets-0.5.0.2-KEFFoebgN3k28DEYjhpoN8!PostgresWebsockets.HasqlBroadcastPostgresWebsockets.BroadcastPostgresWebsockets.ClaimsPostgresWebsockets.DatabasePostgresWebsockets"hasql-1.4.1-6ZBMYry5dw9Lg1JENwnCQFHasql.Private.Connectionacquire stm-2.5.0.0Control.Concurrent.STM.TQueue readTQueue writeTQueueControl.Concurrent.STM.TChan readTChan MultiplexersrcMessagechannelpayloadrelayMessagesForever relayMessagesnewMultiplexer onMessage$fShowMultiplexer $fEqMessage $fShowMessagevalidateClaims$fEqJWTAttempt PgIdentifiertoPgIdentifier notifyPoolnotifylistenunlistenwaitForNotifications$fShowPgIdentifiernewHasqlBroadcasternewHasqlBroadcasterOrErrorpostgresWsMiddleware$fToJSONMessage$fGenericMessage JWTAttempt jwtClaims claims2maphs256jwkfromPgIdentifiernewHasqlBroadcasterForChannel