couchdb_connector v0.5.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

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

Produces the URL to the server given in db_props

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

Produces the URL to a specific design document

Produces the URL to a specific document contained in given database

Produces an URL that can be used to retrieve the given number of UUIDs from CouchDB. This endpoint does not require authentication

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

Produces the URL to a specific view from a given design document

Functions

admin_url(db_props, username)

Produces the URL to a specific admin.

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.

database_url(db_props)

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

design_url(db_props, design)

Produces the URL to a specific design document.

document_url(db_props, id)

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

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. This endpoint does not require authentication.

query_path(view_base_url, key, stale)
query_path(String.t, String.t, atom) :: String.t
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)

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

user_url(db_props, username)

Produces the URL to a specific user.

view_url(db_props, design, view)

Produces the URL to a specific view from a given design document.