Dayron v0.1.1 Dayron.Config

Helpers to handle application configuration values.

Summary

Functions

Retrieves and normalizes the configuration for repo in otp_app

Given a config map, model and options, returns the complete url for the api request

Returns a %Dayron.Request with provided data and application config

Parses the OTP configuration for compilation time

Parses the application configuration :url key, accepting system env or a binary

Functions

get(repo, otp_app)

Retrieves and normalizes the configuration for repo in otp_app.

get_request_url(config, model, opts)

Given a config map, model and options, returns the complete url for the api request.

Example

> Config.get_request_url(config, MyModel, [id: id])
"http://api.example.com/mymodels/id"
init_request_data(config, method, model, opts \\ [])

Returns a %Dayron.Request with provided data and application config

parse(repo, opts)

Parses the OTP configuration for compilation time.

parse_url(url)
parse_url!(config, repo, otp_app)

Parses the application configuration :url key, accepting system env or a binary