Documentation ¶
Index ¶
- type CSharpFuncs
- type CollectionDeleteFuncs
- type CollectionInsertFuncs
- type CollectionUpdateFuncs
- type EmailFuncs
- type EmailStru
- type Funcs
- func (f *Funcs) CancelExecution(errormessage string)
- func (f *Funcs) ConvertfromBytes(bytesbuffer []byte) map[string]interface{}
- func (f *Funcs) ConverttoBool(str string) bool
- func (f *Funcs) ConverttoDateTime(str string) time.Time
- func (f *Funcs) ConverttoFloat(str string) float64
- func (f *Funcs) ConverttoInt(str string) int
- func (f *Funcs) Execute()
- func (f *Funcs) HandleInputs() ([]string, []string, map[string]interface{}, error)
- func (f *Funcs) SetInputs() ([]string, []string, map[string]interface{})
- func (f *Funcs) SetOutputs(outputs map[string]interface{})
- func (f *Funcs) SetfuncOutputs()
- func (f *Funcs) SetfuncSingleOutputs(outputs map[string]interface{})
- func (f *Funcs) Validate() (bool, error)
- type GoExprFuncs
- type InputMapFuncs
- type JSFuncs
- func (cf *JSFuncs) Execute(f *Funcs)
- func (cf *JSFuncs) Execute_otto(f *Funcs)
- func (cf *JSFuncs) Testfunction(content string, inputs interface{}, outputs []string) (map[string]interface{}, error)
- func (cf *JSFuncs) Testfunction_otto(content string, inputs interface{}, outputs []string) (map[string]interface{}, error)
- func (cf *JSFuncs) Validate(f *Funcs) (bool, error)
- func (cf *JSFuncs) Validate_otto(f *Funcs) (bool, error)
- type QueryFuncs
- type Response
- type SendMessageFuncs
- type SendMessagebyActiveMQ
- type SendMessagebyKafka
- type SendMessagebyMQTT
- type StoreProcFuncs
- type SubTranCode
- type SubTranCodeFuncs
- type TableDeleteFuncs
- type TableInsertFuncs
- type TableUpdateFuncs
- type ThrowErrorFuncs
- type TranFlow
- type WebServiceCallFunc
- type WorkFlowFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSharpFuncs ¶
type CSharpFuncs struct { }
func (*CSharpFuncs) Execute ¶
func (cf *CSharpFuncs) Execute(f *Funcs)
func (*CSharpFuncs) Testfunction ¶
func (cf *CSharpFuncs) Testfunction(content string, inputs interface{}, outputs []string) (map[string]interface{}, error)
type CollectionDeleteFuncs ¶
type CollectionDeleteFuncs struct { }
func (*CollectionDeleteFuncs) Execute ¶
func (cf *CollectionDeleteFuncs) Execute(f *Funcs)
type CollectionInsertFuncs ¶
type CollectionInsertFuncs struct { }
func (*CollectionInsertFuncs) Execute ¶
func (cf *CollectionInsertFuncs) Execute(f *Funcs)
type CollectionUpdateFuncs ¶
type CollectionUpdateFuncs struct { }
func (*CollectionUpdateFuncs) Execute ¶
func (cf *CollectionUpdateFuncs) Execute(f *Funcs)
type EmailFuncs ¶
type EmailFuncs struct{}
func (*EmailFuncs) Execute ¶
func (cf *EmailFuncs) Execute(f *Funcs)
Execute executes the SendEmail function. It validates the email configuration, sets up the email parameters, and sends the email using the provided SMTP server. If an attachment is specified, it sends the email with the attachment, otherwise it sends the email without any attachment.
func (*EmailFuncs) Validate ¶
func (cf *EmailFuncs) Validate(f *Funcs) (bool, EmailStru)
Validate validates the inputs for sending an email. It checks if the required fields (ToEmails, Subject, Body) are not empty. If any of the required fields are empty, it returns false along with the empty email structure. Otherwise, it returns true along with the populated email structure.
type Funcs ¶
type Funcs struct { Fobj types.Function DBTx *sql.Tx Ctx context.Context CtxCancel context.CancelFunc SystemSession map[string]interface{} // {sessionanme: value} UserSession map[string]interface{} // {sessionanme: value} Externalinputs map[string]interface{} // {sessionanme: value} Externaloutputs map[string]interface{} // {sessionanme: value} FuncCachedVariables map[string]interface{} FunctionInputs []map[string]interface{} FunctionOutputs []map[string]interface{} ExecutionNumber int ExecutionCount int FunctionMappedInputs map[string]interface{} DocDBCon *documents.DocDB SignalRClient signalr.Client ErrorMessage string TestwithSc bool TestResults []map[string]interface{} // contains filtered or unexported fields }
func (*Funcs) CancelExecution ¶
CancelExecution cancels the execution of the function and rolls back any database transaction. It takes an error message as input and logs the error message along with the function name. It also cancels the context and returns.
func (*Funcs) ConvertfromBytes ¶
func (*Funcs) ConverttoBool ¶
func (*Funcs) ConverttoFloat ¶
func (*Funcs) ConverttoInt ¶
func (*Funcs) Execute ¶
func (f *Funcs) Execute()
Execute executes the function. It measures the execution time, handles panics, and executes the appropriate function based on the function type. It also sets the function outputs and updates the execution count.
func (*Funcs) HandleInputs ¶
func (*Funcs) SetOutputs ¶
func (*Funcs) SetfuncOutputs ¶
func (f *Funcs) SetfuncOutputs()
func (*Funcs) SetfuncSingleOutputs ¶
SetfuncSingleOutputs sets the single outputs of the Funcs object based on the provided map of outputs. It iterates through the outputs of the Funcs object and assigns the corresponding values from the map to the appropriate destinations. The UserSession, Externaloutputs, and FuncCachedVariables are updated accordingly. If an error occurs during the process, it is recovered and logged. The performance duration of the function is also logged. Parameters: - outputs: A map of string keys and interface{} values representing the outputs. Returns: - An error if there was an error in the process.
type GoExprFuncs ¶
type GoExprFuncs struct { }
func (*GoExprFuncs) Execute ¶
func (cf *GoExprFuncs) Execute(f *Funcs)
func (*GoExprFuncs) Testfunction ¶
func (cf *GoExprFuncs) Testfunction(content string, inputs interface{}, outputs []string) (map[string]interface{}, error)
type InputMapFuncs ¶
type InputMapFuncs struct{}
func (*InputMapFuncs) Execute ¶
func (cf *InputMapFuncs) Execute(f *Funcs)
func (*InputMapFuncs) Validate ¶
func (cf *InputMapFuncs) Validate(f *Funcs) bool
type JSFuncs ¶
type JSFuncs struct { }
func (*JSFuncs) Execute ¶
Execute executes the JavaScript function defined in the Funcs object. It sets the inputs, runs the JavaScript code, and sets the outputs. If there is an error during execution, it logs the error and returns. The execution time is also logged.
func (*JSFuncs) Execute_otto ¶
func (*JSFuncs) Testfunction ¶
func (cf *JSFuncs) Testfunction(content string, inputs interface{}, outputs []string) (map[string]interface{}, error)
Testfunction is a function that executes JavaScript code using the goja VM. It takes a content string, inputs interface{}, and outputs []string as parameters. The function returns a map[string]interface{} containing the values of the specified outputs, and an error if there was an error during execution. The execution time is also logged.
func (*JSFuncs) Testfunction_otto ¶
type QueryFuncs ¶
type QueryFuncs struct { }
func (*QueryFuncs) Execute ¶
func (cf *QueryFuncs) Execute(f *Funcs)
Execute executes the query function. It measures the execution time and logs performance metrics. If there is an error during execution, it logs the error and sets the error message. It sets the user session and creates a SELECT clause with aliases. It performs the query operation using the provided database connection. It logs the outputs, column count, and row count. Finally, it sets the outputs of the function.
func (*QueryFuncs) Testfunction ¶
func (cf *QueryFuncs) Testfunction(f *Funcs) (bool, error)
type SendMessageFuncs ¶
type SendMessageFuncs struct { }
func (*SendMessageFuncs) Execute ¶
func (cf *SendMessageFuncs) Execute(f *Funcs)
Execute executes the SendMessageFuncs function. It sets the start time, defers the calculation of elapsed time and logging of performance, and recovers from any panics that occur during execution. It retrieves the inputs, sets the topic and data, and marshals the data into JSON format. If the topic is empty, it logs an error and returns. It then invokes the SignalRClient or IACMessageBusClient to send the message. Finally, it sets the outputs of the function.
func (*SendMessageFuncs) Validate ¶
func (cf *SendMessageFuncs) Validate(f *Funcs) (bool, error)
Validate validates the SendMessageFuncs function. It checks if the namelist and valuelist are empty, and if the "Topic" name is present in the namelist. Returns true if the validation passes, otherwise returns false with an error. It also logs the performance of the function.
type SendMessagebyActiveMQ ¶
type SendMessagebyActiveMQ struct { }
func (*SendMessagebyActiveMQ) Execute ¶
func (w *SendMessagebyActiveMQ) Execute(f *Funcs)
type SendMessagebyKafka ¶
type SendMessagebyKafka struct { }
func (*SendMessagebyKafka) Execute ¶
func (cf *SendMessagebyKafka) Execute(f *Funcs)
func (*SendMessagebyKafka) Validate ¶
func (cf *SendMessagebyKafka) Validate(f *Funcs) (bool, error)
Validate validates the SendMessagebyKafka function. It checks if the namelist and valuelist are empty, and if the "Topic" name is present in the namelist. Returns true if the validation passes, otherwise returns false with an error. It also logs the performance of the function.
type SendMessagebyMQTT ¶
type SendMessagebyMQTT struct { }
func (*SendMessagebyMQTT) Execute ¶
func (w *SendMessagebyMQTT) Execute(f *Funcs)
type StoreProcFuncs ¶
type StoreProcFuncs struct { }
func (*StoreProcFuncs) Execute ¶
func (cf *StoreProcFuncs) Execute(f *Funcs)
func (*StoreProcFuncs) Testfunction ¶
func (cf *StoreProcFuncs) Testfunction(f *Funcs) (bool, error)
type SubTranCode ¶
type SubTranCode struct { }
type SubTranCodeFuncs ¶
type SubTranCodeFuncs struct {
TranFlowstr TranFlow
}
func NewSubTran ¶
func NewSubTran(tci TranFlow) *SubTranCodeFuncs
NewSubTran creates a new instance of SubTranCodeFuncs with the provided TranFlow. It returns a pointer to the newly created SubTranCodeFuncs.
func (*SubTranCodeFuncs) Execute ¶
func (cf *SubTranCodeFuncs) Execute(f *Funcs)
Execute executes the subtran function. It sets the inputs, retrieves the transaction code, and calls the callback function to execute the transaction code. The outputs are then converted and set as the function outputs. If there is an error during execution, it logs the error and sets the error message. It also logs the performance of the function.
func (*SubTranCodeFuncs) Validate ¶
func (cf *SubTranCodeFuncs) Validate(f *Funcs) (bool, error)
Validate is a method of the SubTranCodeFuncs struct that validates the function. It measures the performance of the function and logs the duration. It returns a boolean value indicating the success of the validation and an error if any. It also logs the performance of the function.
type TableDeleteFuncs ¶
type TableDeleteFuncs struct { }
func (*TableDeleteFuncs) Execute ¶
func (cf *TableDeleteFuncs) Execute(f *Funcs)
Execute executes the TableDeleteFuncs function. It retrieves the input values, constructs the WHERE clause based on the key columns, and performs a table delete operation using the provided table name and WHERE clause. The result is stored in the "RowCount" output. If any error occurs during the execution, it is logged and returned.
func (*TableDeleteFuncs) Testfunction ¶
func (cf *TableDeleteFuncs) Testfunction(f *Funcs) (bool, error)
type TableInsertFuncs ¶
type TableInsertFuncs struct { }
func (*TableInsertFuncs) Execute ¶
func (cf *TableInsertFuncs) Execute(f *Funcs)
func (*TableInsertFuncs) Testfunction ¶
func (cf *TableInsertFuncs) Testfunction(f *Funcs) (bool, error)
func (*TableInsertFuncs) Validate ¶
func (cf *TableInsertFuncs) Validate(f *Funcs) (bool, error)
Validate validates the TableInsertFuncs. It measures the performance of the function and logs the duration. It returns true if the validation is successful, otherwise it returns an error. It also logs the performance of the function.
type TableUpdateFuncs ¶
type TableUpdateFuncs struct { }
func (*TableUpdateFuncs) Execute ¶
func (cf *TableUpdateFuncs) Execute(f *Funcs)
func (*TableUpdateFuncs) Testfunction ¶
func (cf *TableUpdateFuncs) Testfunction(f *Funcs) (bool, error)
type ThrowErrorFuncs ¶
type ThrowErrorFuncs struct { }
func (*ThrowErrorFuncs) Execute ¶
func (cf *ThrowErrorFuncs) Execute(f *Funcs)
Execute executes the ThrowErrorFuncs function. It measures the execution time and logs the performance. It recovers from any panics and logs the error. It rolls back the database transaction, cancels the execution context, and sets the error message.
type WebServiceCallFunc ¶
type WebServiceCallFunc struct{}
func (*WebServiceCallFunc) Execute ¶
func (w *WebServiceCallFunc) Execute(f *Funcs)
type WorkFlowFunc ¶
type WorkFlowFunc struct{}
func (*WorkFlowFunc) Execute_CompleteTask ¶
func (w *WorkFlowFunc) Execute_CompleteTask(f *Funcs)
func (*WorkFlowFunc) Execute_Explode ¶
func (w *WorkFlowFunc) Execute_Explode(f *Funcs)
func (*WorkFlowFunc) Execute_StartTask ¶
func (w *WorkFlowFunc) Execute_StartTask(f *Funcs)
Source Files ¶
- TableDeleteFuncs.go
- TableInsertFuncs.go
- TableUpdateFuncs.go
- activemq.go
- collectionDeleteFuncs.go
- collectionInsertFuncs.go
- collectionUpdateFuncs.go
- csharpfuncs.go
- funcs.go
- goexprfuncs.go
- inputmapfuns.go
- jsfuncs.go
- kafkaproducer.go
- queryfuncs.go
- sendMessage.go
- sendemail.go
- sendmsgbymqtt.go
- storeprocfuncs.go
- subtc.go
- throwErrorFuncs.go
- webservice.go
- workflow.go