Skip to content

Kronos-Integration/interceptor-line-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,331 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm License bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities

API

Table of Contents

LineHeaderInterceptor

Extends Interceptor

This interceptor cares about the handling of the messages. It will add the hops and copies the messages

Parameters

  • config
  • endpoint

constructor

Parameters

  • checkProperty
  • validate

_transform

Reads the stream data and split it into lines.

Parameters

  • data
  • enc
  • cb

getRealHeaderCheck

Creates a check which will match the future columns names to there real position

Parameters

  • expectedHeader The expected header
  • caseSensitive Is the header case sensitive
  • fieldNames The fieldNames to use for each field.

Returns any fieldMap This maps the fieldNames to the position in the array.

getCheckInfo

Extracts the boolean value and the severity of a given check name from the checkProperty

Parameters

  • checkProperty The checkProperty as defined in the schema
  • fieldName The name of the field in the checkProperty

Returns any infoObject An object containing the boolean value and the severity

getPreCheck

The pre check will be performed anyhow. It just checks that the content to check exists.

getStrictCheck

returns the Strict header check

Parameters

  • expectedHeader The expected header
  • caseSensitive
  • severity

getMissingColumnCheck

Creates the missing column check

Parameters

  • expectedHeader The expected header
  • caseSensitive Is the header case sensitive
  • severity The severity if the check fails

getMandatoryColumnCheck

Creates the mandatory column check. This is every time case sensitive as we used the associated column names.

Parameters

  • mandatoryColumns The mandatory columns. BUT these are the associated fieldnames, not the original column names
  • severity The severity if the check fails

foundColumns

Parameters

  • the coluns found and matched.

getAdditionalColumnCheck

Creates the additional column check. Additional columns not allowed

Parameters

  • expectedHeader The expected header
  • caseSensitive Is the header case sensitive
  • severity The severity if the check fails

About

Validates a header for a token stream

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •