ExOss.CDN (ExOss v1.0.0)

Copy Markdown View Source

CDN dispatcher that routes to the appropriate CDN adapter module based on the client's cdn.module configuration.

This module is the single entry point for all CDN operations. It delegates to the module stored in ExOss.Client.CDN.module, which is resolved at client construction time from the :provider atom.

Supported CDN Providers

Adding a New CDN Provider

  1. Create a module implementing ExOss.CDN.Behaviour
  2. In ExOss.Client, add a mapping from your provider atom to the module
  3. In ExOss.Client.CDN, add the provider atom to the validation list

Summary

Functions

authorize_download_url(client, bucket, res_key, expires_in, opts)

@spec authorize_download_url(
  ExOss.Client.Client.t(),
  binary(),
  binary(),
  non_neg_integer(),
  keyword()
) ::
  binary()

upload_credential(client, bucket, res_key, expires_in)

@spec upload_credential(
  ExOss.Client.Client.t(),
  binary(),
  binary(),
  non_neg_integer()
) ::
  ExOss.UploadCredential.t()