Functions

__register

INTERNAL usage - registers a handler function.

createContext
I

INTERNAL usage - creates function context.

getBallerinaValueFromInputData
I

INTERNAL usage - Returns a converted Ballerina value from input data.

getBinaryFromHTTPReq
I

INTERNAL usage - Returns the binary payload from the HTTP request.

getBodyFromHTTPInputData
I

INTERNAL usage - Returns the HTTP body value from input data.

getBytesFromInputData
I

INTERNAL usage - Returns the binary value from input data.

getHTTPRequestFromInputData
I

INTERNAL usage - Populates the HTTP request structure from an input data entry.

getHTTPRequestFromParams
I

INTERNAL usage - Returns the HTTP request data.

getJsonFromHTTPReq
I

INTERNAL usage - Returns the JSON payload from the HTTP request.

getJsonFromInputData
I

INTERNAL usage - Returns the JSON value from input data.

getJsonFromMetadata
I

INTERNAL usage - Returns a json value from metadata.

getJsonStringFromInputData
I

INTERNAL usage - Returns the JSON string value from input data.

getMetadata
I

INTERNAL usage - extracts the metadata.

getOptionalBallerinaValueFromInputData
I

INTERNAL usage - Returns the optional converted Ballerina value from "getParsedJsonFromJsonStringFromInputData".

getOptionalBytesFromInputData
I

INTERNAL usage - Returns the optional binary value from input data.

getOptionalStringConvertedBytesFromInputData
I

INTERNAL usage - Returns the optional string value converted from input binary data.

getOptionalStringFromInputData
I

INTERNAL usage - Returns the optional string value from input data.

getParsedJsonFromJsonStringFromInputData
I

INTERNAL usage - JSON parse the string value available from "getJsonStringFromInputData".

getStringConvertedBytesFromInputData
I

INTERNAL usage - Returns the string value converted from input binary data.

getStringFromHTTPReq
I

INTERNAL usage - Returns the string payload from the HTTP request.

getStringFromInputData
I

INTERNAL usage - Returns the string value from input data.

getStringFromMetadata
I

INTERNAL usage - Returns a string value from metadata.

setBallerinaValueAsJsonReturn
I

INTERNAL usage - Converts a Ballerina value to a JSON and set the return value.

setBlobOutput
I

INTERNAL usage - Sets the Blob output.

setCosmosDBBallerinaValueAsJsonReturn
I

INTERNAL usage - Converts a CosmosDS Ballerina value to a JSON and set the return value.

setCosmosDBJsonReturn
I

INTERNAL usage - Sets the CosmosDS JSON return value.

setHTTPOutput
I

INTERNAL usage - Sets the HTTP output.

setHTTPReturn
I

INTERNAL usage - Sets the HTTP binding return value.

setJsonReturn
I

INTERNAL usage - Sets the JSON return value.

setPureHTTPOutput
I

INTERNAL usage - Sets the pure HTTP output.

setPureStringOutput
I

INTERNAL usage - Sets the pure string output.

setStringOutput
I

INTERNAL usage - Sets the string output.

setStringReturn
I

INTERNAL usage - Sets the string return value.

setTwilioSmsOutput
I

INTERNAL usage - Sets the Twilio output.

__register

function __register(string name, FunctionHandler funcHandler)

INTERNAL usage - registers a handler function.

Parameters

  • name string
  • The name of the function

createContext

function createContext(HandlerParams hparams, boolean populateMetadata) returns Context | error
Isolated Function

INTERNAL usage - creates function context.

Parameters

  • populateMetadata boolean
  • The flag to populate metadata

Return Type

(Context | error)

The function context

getBallerinaValueFromInputData

function getBallerinaValueFromInputData(HandlerParams params, string name, typedesc<anydata> recordType) returns anydata | error
Isolated Function

INTERNAL usage - Returns a converted Ballerina value from input data.

Parameters

  • name string
  • The input data entry name

  • recordType typedesc<anydata>
  • The record type descriptor

Return Type

(anydata | error)

The JSON value

getBinaryFromHTTPReq

function getBinaryFromHTTPReq(HandlerParams params) returns byte[ ] | error
Isolated Function

INTERNAL usage - Returns the binary payload from the HTTP request.

Parameters

Return Type

(byte[ ] | error)

The binary payload

getBodyFromHTTPInputData

function getBodyFromHTTPInputData(HandlerParams params, string name) returns string | error
Isolated Function

INTERNAL usage - Returns the HTTP body value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(string | error)

The HTTP body

getBytesFromInputData

function getBytesFromInputData(HandlerParams params, string name) returns byte[ ] | error
Isolated Function

INTERNAL usage - Returns the binary value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(byte[ ] | error)

The binary value

getHTTPRequestFromInputData

function getHTTPRequestFromInputData(HandlerParams params, string name) returns HTTPRequest | error
Isolated Function

INTERNAL usage - Populates the HTTP request structure from an input data entry.

Parameters

  • name string
  • The input data entry name

Return Type

(HTTPRequest | error)

The HTTP request

getHTTPRequestFromParams

function getHTTPRequestFromParams(HandlerParams params) returns Request | error
Isolated Function

INTERNAL usage - Returns the HTTP request data.

Parameters

Return Type

(Request | error)

The HTTP request

getJsonFromHTTPReq

function getJsonFromHTTPReq(HandlerParams params) returns json | error
Isolated Function

INTERNAL usage - Returns the JSON payload from the HTTP request.

Parameters

Return Type

(json | error)

The JSON payload

getJsonFromInputData

function getJsonFromInputData(HandlerParams params, string name) returns json | error
Isolated Function

INTERNAL usage - Returns the JSON value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(json | error)

The JSON value

getJsonFromMetadata

function getJsonFromMetadata(HandlerParams params, string name) returns json | error
Isolated Function

INTERNAL usage - Returns a json value from metadata.

Parameters

  • name string
  • The metadata entry name

Return Type

(json | error)

The metadata entry value

getJsonStringFromInputData

function getJsonStringFromInputData(HandlerParams params, string name) returns string | error
Isolated Function

INTERNAL usage - Returns the JSON string value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(string | error)

The string value

getMetadata

function getMetadata(HandlerParams hparams) returns json | error
Isolated Function

INTERNAL usage - extracts the metadata.

Parameters

Return Type

(json | error)

The metadata JSON

getOptionalBallerinaValueFromInputData

function getOptionalBallerinaValueFromInputData(HandlerParams params, string name, typedesc<anydata> recordType) returns anydata? | error
Isolated Function

INTERNAL usage - Returns the optional converted Ballerina value from "getParsedJsonFromJsonStringFromInputData".

Parameters

  • name string
  • The input data entry name

  • recordType typedesc<anydata>
  • The record type descriptor

Return Type

(anydata? | error)

The JSON value

getOptionalBytesFromInputData

function getOptionalBytesFromInputData(HandlerParams params, string name) returns byte[ ]? | error
Isolated Function

INTERNAL usage - Returns the optional binary value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(byte[ ]? | error)

The optional string value

getOptionalStringConvertedBytesFromInputData

function getOptionalStringConvertedBytesFromInputData(HandlerParams params, string name) returns string? | error
Isolated Function

INTERNAL usage - Returns the optional string value converted from input binary data.

Parameters

  • name string
  • The input data entry name

Return Type

(string? | error)

The optional binary value

getOptionalStringFromInputData

function getOptionalStringFromInputData(HandlerParams params, string name) returns string? | error
Isolated Function

INTERNAL usage - Returns the optional string value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(string? | error)

The optional string value

getParsedJsonFromJsonStringFromInputData

function getParsedJsonFromJsonStringFromInputData(HandlerParams params, string name) returns json | error
Isolated Function

INTERNAL usage - JSON parse the string value available from "getJsonStringFromInputData".

Parameters

  • name string
  • The input data entry name

Return Type

(json | error)

The JSON value

getStringConvertedBytesFromInputData

function getStringConvertedBytesFromInputData(HandlerParams params, string name) returns string | error
Isolated Function

INTERNAL usage - Returns the string value converted from input binary data.

Parameters

  • name string
  • The input data entry name

Return Type

(string | error)

The string value

getStringFromHTTPReq

function getStringFromHTTPReq(HandlerParams params) returns string | error
Isolated Function

INTERNAL usage - Returns the string payload from the HTTP request.

Parameters

Return Type

(string | error)

The string payload

getStringFromInputData

function getStringFromInputData(HandlerParams params, string name) returns string | error
Isolated Function

INTERNAL usage - Returns the string value from input data.

Parameters

  • name string
  • The input data entry name

Return Type

(string | error)

The string value

getStringFromMetadata

function getStringFromMetadata(HandlerParams params, string name) returns string | error
Isolated Function

INTERNAL usage - Returns a string value from metadata.

Parameters

  • name string
  • The metadata entry name

Return Type

(string | error)

The metadata entry value

setBallerinaValueAsJsonReturn

function setBallerinaValueAsJsonReturn(HandlerParams params, anydata value) returns error?
Isolated Function

INTERNAL usage - Converts a Ballerina value to a JSON and set the return value.

Parameters

  • value anydata
  • The value

Return Type

(error?)

An error in failure

setBlobOutput

function setBlobOutput(HandlerParams params, string name, any binding) returns error?
Isolated Function

INTERNAL usage - Sets the Blob output.

Parameters

  • name string
  • The parameter name

  • binding any
  • The binding data

Return Type

(error?)

An error in failure

setCosmosDBBallerinaValueAsJsonReturn

function setCosmosDBBallerinaValueAsJsonReturn(HandlerParams params, anydata value, string partitionKey) returns error?
Isolated Function

INTERNAL usage - Converts a CosmosDS Ballerina value to a JSON and set the return value.

Parameters

  • value anydata
  • The value

  • partitionKey string
  • The partition key

Return Type

(error?)

An error in failure

setCosmosDBJsonReturn

function setCosmosDBJsonReturn(HandlerParams params, json value, string partitionKey) returns error?
Isolated Function

INTERNAL usage - Sets the CosmosDS JSON return value.

Parameters

  • value json
  • The JSON return value

  • partitionKey string
  • The partition key

Return Type

(error?)

An error in failure

setHTTPOutput

function setHTTPOutput(HandlerParams params, string name, HTTPBinding binding) returns error?
Isolated Function

INTERNAL usage - Sets the HTTP output.

Parameters

  • name string
  • The parameter name

Return Type

(error?)

An error in failure

setHTTPReturn

function setHTTPReturn(HandlerParams params, HTTPBinding binding) returns error?
Isolated Function

INTERNAL usage - Sets the HTTP binding return value.

Parameters

Return Type

(error?)

An error in failure

setJsonReturn

function setJsonReturn(HandlerParams params, json value) returns error?
Isolated Function

INTERNAL usage - Sets the JSON return value.

Parameters

  • value json
  • The JSON return value

Return Type

(error?)

An error in failure

setPureHTTPOutput

function setPureHTTPOutput(HandlerParams params, HTTPBinding binding) returns error?
Isolated Function

INTERNAL usage - Sets the pure HTTP output.

Parameters

Return Type

(error?)

An error in failure

setPureStringOutput

function setPureStringOutput(HandlerParams params, string value) returns error?
Isolated Function

INTERNAL usage - Sets the pure string output.

Parameters

Return Type

(error?)

An error in failure

setStringOutput

function setStringOutput(HandlerParams params, string name, StringOutputBinding binding) returns error?
Isolated Function

INTERNAL usage - Sets the string output.

Parameters

  • name string
  • The parameter name

Return Type

(error?)

An error in failure

setStringReturn

function setStringReturn(HandlerParams params, string value) returns error?
Isolated Function

INTERNAL usage - Sets the string return value.

Parameters

  • value string
  • The string return value

Return Type

(error?)

An error in failure

setTwilioSmsOutput

function setTwilioSmsOutput(HandlerParams params, string name, TwilioSmsOutputBinding binding) returns error?
Isolated Function

INTERNAL usage - Sets the Twilio output.

Parameters

  • name string
  • The parameter name

Return Type

(error?)

An error in failure