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{} or undefined (in which case the column headers are used as property names)
#import_csv_definition{} properties:
  • basename: unknown
  • filename: unknown

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

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

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

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

export_resource_filename

mod_export - return the {ok, Filename} for the content disposition.

Type:
first
Return:
{ok, Filename}} or undefined
#export_resource_filename{} properties:
  • dispatch: atom
  • id: integer
  • content_type: string

export_resource_header

mod_export - Fetch the header for the export.

Type:
first
Return:
{ok, list()|binary()}, {ok, list()|binary(), ContinuationState} or {error, Reason}
#export_resource_header{} properties:
  • dispatch: atom
  • id: integer
  • content_type: string

export_resource_visible

mod_export - Check if the resource or dispatch is visible for export.

Type:
first
Return:
true or false
#export_resource_visible{} properties:
  • dispatch: atom
  • id: integer