package
1.4.5-alpha1
Repository: https://github.com/ottemo/commerce.git
Documentation: pkg.go.dev

# Functions

ArgsFindIDKey looks for object identifier mention among command attributes.
ArgsFindWorkingAttributes looks for model attributes inclusion/exclusion mention among command attributes.
ArgsFindWorkingModel looks for model mention among command attributes.
ArgsGetAsNamed collects arguments into map, unnamed arguments will go as position index.
ArgsGetAsNamedBySeparators collects arguments into map, unnamed arguments will go as position index - separators could be defined as argument.
CheckModelImplements checks that model support InterfaceObject and InterfaceStorable interfaces.
CSVToMap converts csv data to map[string]interface{} and sends to processorFunc.
ImportCSVData imports csv data block specified command line.
ImportCSVScript imports csv impex script format.
ImportStartHandler is a middleware to init importState for async "next" procedure.
MapToCSV converts map[string]interface{} to csv data.
RegisterImpexModel registers model instance which supports InterfaceImpexModel interface to import/export system.
RegisterImportCommand registers new command to import/export system.
UnRegisterImpexModel un-registers InterfaceImpexModel capable model from import/export system.
UnRegisterImportCommand un-registers command from import/export system.

# Constants

Package global constants.
Package global constants.
Package global constants.

# Variables

ConstCSVColumnRegexp is a regular expression used to grab csv column information column format: [flags]path [memorize] [type] [convertors] [~|^|?][@a.b.c.]path [={name}|>{name}] [<{type}>] flags - optional column modificator format: [~|^|?] "~" - ignore column on collapse lookup "^" - array column "?" - maybe array column path - attribute name in result map sub-levels separated by "." format: [@a.b.c.]d "@a" - memorized value memorize - marks column to hold value in memorize map, these values can be used in path like "[email protected]" format: ={name} | >{name} {name} - alphanumeric value ={name} - saves {column path} + {column value} to memorize map >{name} - saves {column value} to memorize map type - optional type for column format: <{type}> {type} - int | float | bool convertors - text template modifications you can apply to value before use it format: see (http://golang.org/pkg/text/template/).
flag indicates to have extra log information.
flag indicates to make log of values going to be processed.
Package global variables.
ImportResultHandler will process import call's result It return no values, because of async handler result processing.

# Structs

ImportCmdAlias is a implementer of InterfaceImpexImportCmd - command allows to make record field alias to object attribute value.
ImportCmdAttributeAdd is a implementer of InterfaceImpexImportCmd - command allows to create custom attributes on model.
ImportCmdDelete is a implementer of InterfaceImpexImportCmd - command allows to delete model items from the system.
ImportCmdImport is a implementer of InterfaceImpexImportCmd - command allows to work with InterfaceImpexModel instances.
ImportCmdInsert is a implementer of InterfaceImpexImportCmd - command allows to upload data in system through model item abstraction.
ImportCmdMedia is a implementer of InterfaceImpexImportCmd - command allows to assign media content to models item.
ImportCmdStore is a implementer of InterfaceImpexImportCmd - command allows temporary load/store previous command results during import process.
ImportCmdUpdate is a implementer of InterfaceImpexImportCmd - command allows to update model item data in system.
ImportCmdUpsert is a implementer of InterfaceImpexImportCmd - command allows to update model item data in system by uniqueKeys or will insert new record - skipInsertErrors will continue processing in case of errors during insert.
StructImportingFile holds currently importing file information.
StructImportStatus holds current import status.

# Interfaces

InterfaceImpexImportCmd is an interface used to work with registered import commands.
InterfaceImpexModel is an interface model should implement to make it work with impex service.