keter-0.3.6.1: Web application deployment manager, focusing on Haskell web frameworks

Safe HaskellNone

Keter.Postgres

Contents

Synopsis

Types

type Appname = TextSource

Name of the application. Should just be the basename of the application file.

data DBInfo Source

Information on an individual PostgreSQL database.

Constructors

DBInfo 

Fields

dbiName :: Text
 
dbiUser :: Text
 
dbiPass :: Text
 

data Postgres Source

Abstract type allowing access to config information via getInfo

Settings

setupDBInfo :: Settings -> DBInfo -> IO ()Source

How to create the given user/database. Default: uses the psql command line tool and sudo -u postgres.

Functions

load :: Settings -> FilePath -> KIO (Either SomeException Postgres)Source

Load a set of existing connections from a config file. If the file does not exist, it will be created. Any newly created databases will automatically be saved to this file.

getInfo :: Postgres -> Appname -> KIO (Either SomeException DBInfo)Source

Get information on an individual app's database information. If no information exists, it will create a random database, add it to the config file, and return it.