NetStorage.Config (netstorage v0.2.2)
Configuration struct
set-global-configurations
Set Global Configurations
To set configurations globally, add your configurations to your
config.exs
file.
# config/config.exs
config :netstorage,
content_provider_code: "123,
host: "example.akamaihd.net",
key: "secret-key",
account_id: "accountid"
request-specific-configurations
Request Specific Configurations
To set configurations per request, pass your configurations as an
option to NetStorage.request/2
.
iex> NetStorage.request(operation, [config: [content_provider_code: "123"]])
Link to this section Summary
Link to this section Types
Link to this type
account_id()
@type account_id() :: binary()
Link to this type
content_provider_code()
@type content_provider_code() :: binary()
Link to this type
host()
@type host() :: binary()
Link to this type
key()
@type key() :: binary()
@type t() :: %NetStorage.Config{ account_id: account_id(), content_provider_code: content_provider_code(), host: host(), key: key() }
Link to this section Functions
Link to this function
new()
@spec new() :: t()
Returns a Config
struct with values populated from the application configs.
Link to this function
new(fields)
Returns a Config
struct with the specified fields.