CouchDB (couchdb_auth v0.2.4)
View SourceLightweight CouchDB client builder focused on authentication flows.
The module exposes helpers to build a pre-configured Tesla.Client
alongside a thin wrapper around Tesla.request/2 to keep the original
API surface available.
Summary
Functions
Convenience wrapper around client/2 for admin or cluster endpoints.
Executes an HTTP request against the admin interface.
Build a Tesla.Client configured for the requested interface.
Executes an HTTP request using either the provided %Tesla.Client{} or a
freshly built one.
Types
Functions
@spec admin_client(map()) :: Tesla.Client.t()
Convenience wrapper around client/2 for admin or cluster endpoints.
@spec admin_delete( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_get( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_head( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_options( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_patch( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_post( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_put( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec admin_request(atom(), String.t(), keyword()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Executes an HTTP request against the admin interface.
@spec admin_trace( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec client(interface(), map()) :: Tesla.Client.t()
Build a Tesla.Client configured for the requested interface.
The interface can be :base (default), :backend, or :admin. Additional
credential overrides may be supplied via overrides.
@spec delete( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec get( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec head( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec options( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec patch( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec post( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec put( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
@spec request(atom(), String.t(), keyword()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Executes an HTTP request using either the provided %Tesla.Client{} or a
freshly built one.
@spec trace( String.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}