couchdb_connector v0.5.0 Couchdb.Connector.Types

The types module contains only type definitions that other modules can make use of by simply using this modules: ‘use Couchdb.Connector.Types’

Summary

Types

Username and password for basic authentication

Database properties: host, port, protocol (http|https), database name

HTTP headers are modeled as a list of name-value tuples

User information

CouchDB user role is just a string, user_roles a list of strings

Design name, view name and lookup key are often used together in view queries so it makes sense to wrap them in a type

Types

basic_auth()
basic_auth :: %{user: String.t, password: String.t}

Username and password for basic authentication

db_properties()
db_properties :: %{protocol: String.t, hostname: String.t, database: String.t, port: non_neg_integer, user: String.t, password: String.t}

Database properties: host, port, protocol (http|https), database name

headers()

HTTP headers are modeled as a list of name-value tuples

user_info()
user_info :: %{user: String.t, password: String.t}

User information

user_roles()

CouchDB user role is just a string, user_roles a list of strings.

view_key()
view_key :: %{design: String.t, view: String.t, key: any}

Design name, view name and lookup key are often used together in view queries so it makes sense to wrap them in a type.