Product Help

Connectors Package Methods and Functions

BuildConnectorFromSpec

func BuildConnectorFromSpec(spec generic.SystemSpec) (generic.DataConnector, error)

BuildConnectorFromSpec returns a DataConnector from the given Dataec.

Parameters:

  • spec: The SystemSpec which contains information about what type of connector to create.

Returns:

  • generic.DataConnector: Data connector to return (CSV, Gusto, LDAP, ect.).

  • error: Any errors from the function.

NewCSVConnector

func NewCSVConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewCSVConnector creates a new instance of CSVConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the CSVConnector.

Returns:

  • generic.DataConnector: The new CSVConnector bound to a generic.DataConnector interface.

NewGustoConnector

func NewGustoConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewGustoConnector creates a new instance of GustoConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the GustoConnector.

Returns:

  • generic.DataConnector: The new GustoConnector bound to a generic.DataConnector interface.

NewLDAPConnector

func NewLDAPConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewLDAPConnector creates a new instance of LDAPConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the LDAPConnector.

Returns:

  • generic.DataConnector: The new LDAPConnector bound to a generic.DataConnector interface.

NewQueryRunner

func NewQueryRunner(numWorkers int) *QueryRunner

NewQueryRunner creates a new QueryRunner instance with a specified worker count.

Parameters:

  • numWorkers: The number of workers in the pool.

Returns:

  • *QueryRunner: The new QueryRunner instance.

RunQuery

func (qr *QueryRunner) RunQuery(q generic.Query) promise.Promise[generic.QueryResult]

RunQuery submits a new worker to the generic.WorkerPool.

Parameters:

  • q: The query to run.

Returns:

  • promise.Promise[generic.QueryResult]: A promise.

NewRESTConnector

func NewRESTConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewRESTConnector creates a new instance of RESTConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the RESTConnector.

Returns:

  • generic.DataConnector: The new RESTConnector bound to a generic.DataConnector interface.

NewSalesforceConnector

func NewSalesforceConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewSalesforceConnector creates a new instance of SalesforceConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the SalesforceConnector.

Returns:

  • generic.DataConnector: The new SalesforceConnector bound to a generic.DataConnector interface.

NewSQLConnector

func NewSQLConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewSQLConnector creates a new instance of SQLConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the SQLConnector.

Returns:

  • generic.DataConnector: The new SQLConnector bound to a generic.DataConnector interface.

NewZendeskConnector

func NewZendeskConnector(spec generic.SystemSpec) (generic.DataConnector, error)

NewZendeskConnector creates a new instance of ZendeskConnector bound to a generic.DataConnector interface.

Parameters:

  • spec: Defines the system for the ZendeskConnector.

Returns:

  • generic.DataConnector: The new ZendeskConnector bound to a generic.DataConnector interface.

Last modified: 28 January 2025