couchdb_connector v0.4.0 Couchdb.Connector.UrlHelper

Provides URL helper functions that compose URLs based on given database properties and additional parameters, such as document IDs, usernames, etc.

Most of the time, these functions will be used internally. There should rarely be a need to access these from within your application.

Summary

Functions

Produces the URL to a specific admin, using no authentication

Produces the URL to a specific admin, including basic auth params

Produces the URL to the server given in db_props, using no authentication

Produces the URL to the server given in db_props including basic auth parameters

Produces the URL to a specific database hosted on the given server

Produces the URL to a specific database hosted on the given server including basic auth parameters

Produces the URL to a specific design document, using no authentication

Produces the URL to a specific design document, using basic authentication

Produces the URL to a specific document contained in given database

Produces the URL to a specific document contained in given database, making use of basic authentication

Produces an URL that can be used to retrieve the given number of UUIDs from CouchDB. Authentication is not required

Produces the URL to query a view for a specific key, using the provided staleness setting (either :ok or :update_after)

Produces the URL to the database’s security object. Requires admin credentials

Produces the URL to a specific user, providing no authentication

Produces the URL to a specific user, applying the given admin credentials. Use this to create a new user, given the callers knows some admin credentials

Produces the URL to a specific view from a given design document, using no authentication

Produces the URL to a specific view from a given design document, making use of basic authentication

Functions

admin_url(db_props, username)

Produces the URL to a specific admin, using no authentication

admin_url(db_props, admin_name, password)

Produces the URL to a specific admin, including basic auth params.

database_server_url(db_props)

Produces the URL to the server given in db_props, using no authentication.

database_server_url(db_props, auth)

Produces the URL to the server given in db_props including basic auth parameters.

database_url(db_props)

Produces the URL to a specific database hosted on the given server.

Produces the URL to a specific database hosted on the given server including basic auth parameters.

design_url(db_props, design)

Produces the URL to a specific design document, using no authentication.

Produces the URL to a specific design document, using basic authentication.

document_url(db_props, id)

Produces the URL to a specific document contained in given database.

Produces the URL to a specific document contained in given database, making use of basic authentication.

fetch_uuid_url(db_props, count \\ 1)
fetch_uuid_url(Couchdb.Connector.Types.db_properties, non_neg_integer) :: String.t

Produces an URL that can be used to retrieve the given number of UUIDs from CouchDB. Authentication is not required.

query_path(view_base_url, key, stale)
query_path(String.t, String.t, atom) :: String.t

Produces the URL to query a view for a specific key, using the provided staleness setting (either :ok or :update_after).

security_url(db_props, admin_auth)

Produces the URL to the database’s security object. Requires admin credentials.

user_url(db_props, username)

Produces the URL to a specific user, providing no authentication.

user_url(db_props, admin_auth, username)

Produces the URL to a specific user, applying the given admin credentials. Use this to create a new user, given the callers knows some admin credentials.

view_url(db_props, design, view)

Produces the URL to a specific view from a given design document, using no authentication.

Produces the URL to a specific view from a given design document, making use of basic authentication.