resx v0.1.2 Resx
Link to this section Summary
Link to this section Types
An error.
See error/1
for more information.
An error.
Any error type follows the format of { :error, { type, reason } }
where type
is the type of error and reason
is additional supporting details.
:internal
- There was an internal error when handling the request. This is for errors that are not due to user input and don't belong to any of the other specified error types.
Errors to do with the reference.
:invalid_reference
- The reference structure is not valid. e.g. was malformed, reference of that structure is no longer supported, etc.
Errors to do with the resource.
:unknown_resource
- The resource does not exist
Link to this section Functions
Get the producer module for the given URI scheme.
By default the following URI schemes will be matched to these producers:
Scheme | Producer |
---|---|
data | Resx.Producers.Data |
file | Resx.Producers.File |
resx-transform | Resx.Producers.Transform |
Custom mappings can be provided (or overridden) by configuring the :producers
key.
config :resx,
producers: [
MyDataProducer, # Add any scheme configuration from MyDataProducer
{ "file", nil }, # Overrides the default file scheme to have no producer
{ "custom", MyDataProducer } # Map a new URI scheme to MyDataProducer
]
Shorthand for obtaining the reference.