Product Help

Mapping Package Methods and Functions

Has

func (dm DataMap) Has(key string) bool

Has checks if a key is in the hashmap.

Get

func (dm DataMap) Get(key string) (string, error)

Get retrieves the value from the hashmap.

Parameters:

  • key: Key for the hashmap.

Returns:

  • string: The value associated with the key.

  • error: Any errors from the method.

Mapping

func Mapping( transitionType string, inputFields []string, outputFields []string, transitions map[string]string, rawData []dataMap.DataMap) (requests.Request, error) {

Mapping is used to create a requests.Request based on raw data and lists of inputs and outputs.

Parameters:

  • transitionType: Deprecated.

  • inputFields: A slice of strings used for

  • outputFields: Deprecated.

  • transitions: Deprecated.

  • rawData: A slice of maps representing the data.

ProcessRecord

func ProcessRecord(inputFields []string, transitions map[string]string, rawData dataMap.DataMap) (*data.Data, error)

ProcessRecord creates a data.Data instance based on the parameters passed in. This will be used to create operations for bulk requests.

Parameters:

  • inputFields: A slice of fields that will be used as input.

  • transitions: Deprecated.

  • rawData: A hash map of the raw data.

Returns:

  • *data.Data: The new instance which contains mappings between keys and values.

  • error: Any errors in the function.

Last modified: 28 January 2025