Import/export notifications¶
import_csv_definition¶
Find an import definition for a CSV file by checking the filename of the to be imported file.
- Type:
- first
- Return:
#import_csv_definition{}orundefined(in which case the column headers are used as property names)#import_csv_definition{}properties:- basename:
unknown - filename:
unknown
- basename:
import_resource¶
An external feed delivered a resource. First handler can import it.
- Type:
- first
Return:
#import_resource{}properties:- source:
atom|binary - source_id:
integer|binary - source_url:
binary - source_user_id:
binary|integer - user_id:
integer - name:
binary - props:
list - urls:
list - media_urls:
list - data:
any
- source:
export_resource_content_type¶
mod_export -
- Type:
- first
- Return:
{ok, "text/csv"})for the dispatch rule/id export.#export_resource_content_type{}properties:- dispatch:
atom - id:
integer
- dispatch:
export_resource_data¶
mod_export - fetch a row for the export, can return a list of rows, a binary, and optionally a continuation state. Where Values is [ term() ], i.e. a list of opaque values, to be formatted with #export_resource_format. Return the empty list of values to signify the end of the data stream.
- Type:
- first
- Return:
{ok, Values|binary()},{ok, Values|binary(), ContinuationState}or{error, Reason}#export_resource_data{}properties:- dispatch:
atom - id:
integer - content_type:
string - state:
term
- dispatch:
export_resource_encode¶
mod_export - Encode a single data element.
- Type:
- first
- Return:
{ok, binary()},{ok, binary(), ContinuationState}or{error, Reason}#export_resource_encode{}properties:- dispatch:
atom - id:
integer - content_type:
string - data:
term - state:
term
- dispatch:
export_resource_filename¶
mod_export - return the {ok, Filename} for the content disposition.
- Type:
- first
- Return:
{ok, Filename}}orundefined#export_resource_filename{}properties:- dispatch:
atom - id:
integer - content_type:
string
- dispatch: