plugins

package
v0.0.0-...-cf3d621 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallHttpClient

func CallHttpClient(vm *goja.Runtime, args map[string]interface{}) (interface{}, error)

CallHttpClient simulates HTTP client functionality for testing

func ConvertToString

func ConvertToString(v interface{}) string

ConvertToString converts various types to string for testing

func EvaluateRules

func EvaluateRules(vm *goja.Runtime, rules []map[string]interface{}, data map[string]interface{}) interface{}

EvaluateRules evaluates a set of rules for testing

func FileToString

func FileToString(name string) string

func RenderTemplate

func RenderTemplate(vm *goja.Runtime, args map[string]interface{}) (interface{}, error)

RenderTemplate renders a mustache template for testing

func SendEmail

func SendEmail(vm *goja.Runtime, args map[string]interface{}) (interface{}, error)

SendEmail simulates email sending for testing

func SendMail

func SendMail(mailTo string, subject string, msg string, format string, attach string)

SendMail return function for send mail

func SendMailAsync

func SendMailAsync(mailTo string, subject string, msg string, format string, attach string)

SendMailAsync return function for send mail async

func StringToFile

func StringToFile(filenanme string, content string) error

Types

type ClientHTTP

type ClientHTTP string

func (ClientHTTP) AddFeatureJS

func (d ClientHTTP) AddFeatureJS() map[string]interface{}

func (ClientHTTP) Name

func (d ClientHTTP) Name() string

func (ClientHTTP) Run

func (d ClientHTTP) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromedaryData string,
	callback chan string,
) (payloadOut interface{}, next string, err error)

type ConfigMail

type ConfigMail struct {
	MailSMTP     string `toml:"smtp"`
	MailSMTPPort string `toml:"port"`
	MailFrom     string `toml:"from"`
	MailPassword string `toml:"password"`
}

type ConfigTwilio

type ConfigTwilio struct {
	EnableTwilio    bool
	AccountSid      string
	AuthToken       string
	VerifyServiceID string
}

type GeminiCandidate

type GeminiCandidate struct {
	Content GeminiContent `json:"content"`
}

--- Estructuras para la respuesta de Gemini ---

type GeminiContent

type GeminiContent struct {
	Parts []GeminiPart `json:"parts"`
}

type GeminiPart

type GeminiPart struct {
	Text string `json:"text"`
}

--- Estructuras para la solicitud a Gemini ---

type GeminiRequest

type GeminiRequest struct {
	Contents []GeminiContent `json:"contents"`
}

type GeminiResponse

type GeminiResponse struct {
	Candidates []GeminiCandidate `json:"candidates"`
}

type GojaPlugin

type GojaPlugin string

func (GojaPlugin) AddFeatureJS

func (d GojaPlugin) AddFeatureJS() map[string]interface{}

func (GojaPlugin) Name

func (d GojaPlugin) Name() string

func (GojaPlugin) Run

func (d GojaPlugin) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromedaryData string,
	callback chan string,
) (payload_out interface{}, next string, err error)

type IAnFlow

type IAnFlow string

func (IAnFlow) AddFeatureJS

func (d IAnFlow) AddFeatureJS() map[string]interface{}

func (IAnFlow) Name

func (d IAnFlow) Name() string

func (IAnFlow) Run

func (d IAnFlow) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromedaryData string,
	callback chan string,
) (payloadOut interface{}, next string, err error)

type MailPlugin

type MailPlugin string

func (MailPlugin) AddFeatureJS

func (d MailPlugin) AddFeatureJS() map[string]interface{}

func (MailPlugin) Name

func (d MailPlugin) Name() string

func (MailPlugin) Run

func (d MailPlugin) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromaderyData string,
	callback chan string,
) (payloadOut interface{}, next string, err error)

type OllamaChatRequest

type OllamaChatRequest struct {
	Model    string          `json:"model"`
	Messages []OllamaMessage `json:"messages"`
	Stream   bool            `json:"stream"`
}

type OllamaChatResponse

type OllamaChatResponse struct {
	Message OllamaMessage `json:"message"`
	Done    bool          `json:"done"`
}

type OllamaMessage

type OllamaMessage struct {
	Role    string `json:"role"`    // "system", "user", "assistant"
	Content string `json:"content"` // contenido del mensaje
}

type RulePlugin

type RulePlugin string

func (RulePlugin) AddFeatureJS

func (d RulePlugin) AddFeatureJS() map[string]interface{}

func (RulePlugin) Name

func (d RulePlugin) Name() string

func (RulePlugin) Run

func (d RulePlugin) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, RulePluginData string,
	callback chan string,
) (payload_out interface{}, next string, err error)

type TemplatePluings

type TemplatePluings string

func (TemplatePluings) AddFeatureJS

func (d TemplatePluings) AddFeatureJS() map[string]interface{}

func (TemplatePluings) Name

func (d TemplatePluings) Name() string

func (TemplatePluings) Run

func (d TemplatePluings) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromedaryData string,
	callback chan string,
) (payloadOut interface{}, next string, err error)

type TwilioPlugin

type TwilioPlugin string

func (TwilioPlugin) AddFeatureJS

func (d TwilioPlugin) AddFeatureJS() map[string]interface{}

func (TwilioPlugin) Initialize

func (d TwilioPlugin) Initialize(enable bool, accoundSid, authToken, serviceSid string)

func (TwilioPlugin) Name

func (d TwilioPlugin) Name() string

func (TwilioPlugin) Run

func (d TwilioPlugin) Run(c echo.Context,
	vars map[string]string, payloadIn interface{}, dromaderyData string,
	callback chan string,
) (payloadOut interface{}, next string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL