Documentation
¶
Index ¶
- Variables
- func AnyToRawJSON(data any) (json.RawMessage, error)
- func DeepCopy(data interface{}) interface{}
- func ExcludeFromMap(m map[string]interface{}, keys []string) map[string]interface{}
- func FilterMap(m map[string]interface{}, keys []string) map[string]interface{}
- func FormatJSONValue(value interface{}) string
- func GetArray(data JSON, path string) ([]interface{}, error)
- func GetAuthDisplayName(authType AuthType) string
- func GetAuthIcon(authType AuthType) string
- func GetBool(data JSON, path string) (bool, error)
- func GetFloat(data JSON, path string) (float64, error)
- func GetInt(data JSON, path string) (int, error)
- func GetObject(data JSON, path string) (map[string]interface{}, error)
- func GetPathValue(obj interface{}, path string) (interface{}, bool)
- func GetString(data JSON, path string) (string, error)
- func GetTriggerDisplayName(triggerType TriggerType) string
- func GetTriggerIcon(triggerType TriggerType) string
- func GetValue(data JSON, path string) (interface{}, error)
- func MergeJSON(target, source map[string]interface{}) map[string]interface{}
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func ParseJSONPath(path string) ([]string, error)
- func PrettyPrint(data interface{})
- func RawJSONToAny(raw json.RawMessage) (any, error)
- func RemoveValue(data map[string]interface{}, path string) error
- func SetPathValue(obj map[string]interface{}, path string, value interface{}) (map[string]interface{}, bool)
- func SetValue(data map[string]interface{}, path string, value interface{}) error
- func ToJSONRaw(data any) (json.RawMessage, error)
- func ToJSONRawPretty(data any) (json.RawMessage, error)
- type APITriggerCriteria
- type ActionSettings
- type ActionType
- func (_j ActionType) IsValid() bool
- func (_j ActionType) MarshalBinary() ([]byte, error)
- func (_j ActionType) MarshalGQL(w io.Writer)
- func (_j ActionType) MarshalJSON() ([]byte, error)
- func (_j ActionType) MarshalText() ([]byte, error)
- func (_j ActionType) MarshalYAML() (interface{}, error)
- func (ActionType) SQLTypeName() string
- func (_j *ActionType) Scan(value interface{}) error
- func (_j ActionType) String() string
- func (_j *ActionType) UnmarshalBinary(text []byte) error
- func (_j *ActionType) UnmarshalGQL(value interface{}) error
- func (_j *ActionType) UnmarshalJSON(data []byte) error
- func (_j *ActionType) UnmarshalText(text []byte) error
- func (_j *ActionType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_j ActionType) Validate() error
- func (ActionType) Values() []string
- type AuthMetadata
- type AuthType
- func (_j AuthType) IsValid() bool
- func (_j AuthType) MarshalBinary() ([]byte, error)
- func (_j AuthType) MarshalGQL(w io.Writer)
- func (_j AuthType) MarshalJSON() ([]byte, error)
- func (_j AuthType) MarshalText() ([]byte, error)
- func (_j AuthType) MarshalYAML() (interface{}, error)
- func (AuthType) SQLTypeName() string
- func (_j *AuthType) Scan(value interface{}) error
- func (_j AuthType) String() string
- func (_j *AuthType) UnmarshalBinary(text []byte) error
- func (_j *AuthType) UnmarshalGQL(value interface{}) error
- func (_j *AuthType) UnmarshalJSON(data []byte) error
- func (_j *AuthType) UnmarshalText(text []byte) error
- func (_j *AuthType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_j AuthType) Validate() error
- func (AuthType) Values() []string
- type BranchMode
- type BranchSettings
- type DynamicOptionsFilterParams
- type DynamicOptionsResponse
- type Environment
- type EventTriggerCriteria
- type FlowComponentType
- type FlowRouter
- func (b *FlowRouter) AsDefault() *FlowRouter
- func (b *FlowRouter) WithCondition(condition string) *FlowRouter
- func (b *FlowRouter) WithFieldCondition(field string, operator string, value interface{}) *FlowRouter
- func (b *FlowRouter) WithOrder(order int) *FlowRouter
- func (b *FlowRouter) WithValue(value interface{}) *FlowRouter
- type IntegrationBuildMetadata
- type IntegrationLanguage
- func (_j IntegrationLanguage) IsValid() bool
- func (_j IntegrationLanguage) MarshalGQL(w io.Writer)
- func (_j IntegrationLanguage) MarshalJSON() ([]byte, error)
- func (IntegrationLanguage) SQLTypeName() string
- func (_j IntegrationLanguage) String() string
- func (_j *IntegrationLanguage) UnmarshalGQL(value interface{}) error
- func (_j *IntegrationLanguage) UnmarshalJSON(data []byte) error
- func (_j IntegrationLanguage) Validate() error
- func (IntegrationLanguage) Values() []string
- type IntegrationPlatform
- func (_j IntegrationPlatform) IsValid() bool
- func (_j IntegrationPlatform) MarshalJSON() ([]byte, error)
- func (IntegrationPlatform) SQLTypeName() string
- func (_j IntegrationPlatform) String() string
- func (_j *IntegrationPlatform) UnmarshalJSON(data []byte) error
- func (_j IntegrationPlatform) Validate() error
- func (IntegrationPlatform) Values() []string
- type JSON
- type JSONObject
- type Log
- type LogBuilder
- type LogEntry
- type LogLevel
- type LogLine
- type LogLineLevel
- func (_j LogLineLevel) IsValid() bool
- func (_j LogLineLevel) MarshalBinary() ([]byte, error)
- func (_j LogLineLevel) MarshalGQL(w io.Writer)
- func (_j LogLineLevel) MarshalJSON() ([]byte, error)
- func (_j LogLineLevel) MarshalText() ([]byte, error)
- func (_j LogLineLevel) MarshalYAML() (interface{}, error)
- func (LogLineLevel) SQLTypeName() string
- func (_j *LogLineLevel) Scan(value interface{}) error
- func (_j LogLineLevel) String() string
- func (_j *LogLineLevel) UnmarshalBinary(text []byte) error
- func (_j *LogLineLevel) UnmarshalGQL(value interface{}) error
- func (_j *LogLineLevel) UnmarshalJSON(data []byte) error
- func (_j *LogLineLevel) UnmarshalText(text []byte) error
- func (_j *LogLineLevel) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_j LogLineLevel) Validate() error
- func (LogLineLevel) Values() []string
- type LogSink
- type Logger
- type ManualTriggerCriteria
- type MessageTriggerCriteria
- type NoopLogger
- func (n *NoopLogger) AddLog(level LogLevel, message string, a ...any)
- func (n *NoopLogger) AddLogMessage(level LogLevel, message string)
- func (n *NoopLogger) ClearLogs()
- func (n *NoopLogger) Clone() Logger
- func (n *NoopLogger) Debug(message string)
- func (n *NoopLogger) Debugf(message string, a ...any)
- func (n *NoopLogger) Error(err error)
- func (n *NoopLogger) Errorf(err error, message string, a ...any)
- func (n *NoopLogger) GetLogs() []LogEntry
- func (n *NoopLogger) Info(message string)
- func (n *NoopLogger) Infof(message string, a ...any)
- func (n *NoopLogger) SetPrefix(prefix string)
- func (n *NoopLogger) Warn(message string)
- func (n *NoopLogger) Warnf(message string, a ...any)
- func (n *NoopLogger) WithField(key string, value interface{}) Logger
- func (n *NoopLogger) WithFields(fields map[string]interface{}) Logger
- type OffsetPaginationMeta
- type PollingTriggerCriteria
- type RetryPolicy
- type RouterSettings
- type RouterType
- type ScheduleTriggerCriteria
- type StepRunStatus
- func (s StepRunStatus) IsActive() bool
- func (s StepRunStatus) IsComplete() bool
- func (s StepRunStatus) IsFailed() bool
- func (s StepRunStatus) IsSuccessful() bool
- func (s StepRunStatus) IsTerminalStatus() bool
- func (_j StepRunStatus) IsValid() bool
- func (_j StepRunStatus) MarshalBinary() ([]byte, error)
- func (_j StepRunStatus) MarshalGQL(w io.Writer)
- func (_j StepRunStatus) MarshalJSON() ([]byte, error)
- func (_j StepRunStatus) MarshalText() ([]byte, error)
- func (_j StepRunStatus) MarshalYAML() (interface{}, error)
- func (StepRunStatus) SQLTypeName() string
- func (_j *StepRunStatus) Scan(value interface{}) error
- func (s StepRunStatus) StatusColor() string
- func (s StepRunStatus) StatusIcon() string
- func (_j StepRunStatus) String() string
- func (_j *StepRunStatus) UnmarshalBinary(text []byte) error
- func (_j *StepRunStatus) UnmarshalGQL(value interface{}) error
- func (_j *StepRunStatus) UnmarshalJSON(data []byte) error
- func (_j *StepRunStatus) UnmarshalText(text []byte) error
- func (_j *StepRunStatus) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_j StepRunStatus) Validate() error
- func (StepRunStatus) Values() []string
- type SystemActivityLog
- type SystemActivityLogs
- type TriggerCriteria
- type TriggerSettings
- type TriggerType
- func (_j TriggerType) IsValid() bool
- func (_j TriggerType) MarshalBinary() ([]byte, error)
- func (_j TriggerType) MarshalGQL(w io.Writer)
- func (_j TriggerType) MarshalJSON() ([]byte, error)
- func (_j TriggerType) MarshalText() ([]byte, error)
- func (_j TriggerType) MarshalYAML() (interface{}, error)
- func (t TriggerType) RequiresConfiguration() bool
- func (TriggerType) SQLTypeName() string
- func (_j *TriggerType) Scan(value interface{}) error
- func (_j TriggerType) String() string
- func (t TriggerType) SupportsManualTrigger() bool
- func (t TriggerType) SupportsPolling() bool
- func (t TriggerType) SupportsScheduling() bool
- func (t TriggerType) SupportsWebhook() bool
- func (_j *TriggerType) UnmarshalBinary(text []byte) error
- func (_j *TriggerType) UnmarshalGQL(value interface{}) error
- func (_j *TriggerType) UnmarshalJSON(data []byte) error
- func (_j *TriggerType) UnmarshalText(text []byte) error
- func (_j *TriggerType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_j TriggerType) Validate() error
- func (TriggerType) Values() []string
- type WebhookTriggerCriteria
- type WorkflowTriggerCriteria
- type WriteLogLineOpts
Constants ¶
This section is empty.
Variables ¶
var ErrNoValidEnum = errors.New("not a valid enum")
Functions ¶
func AnyToRawJSON ¶ added in v0.11.0
func AnyToRawJSON(data any) (json.RawMessage, error)
AnyToRawJSON converts any Go value to a json.RawMessage
func DeepCopy ¶
func DeepCopy(data interface{}) interface{}
DeepCopy creates a deep copy of a JSON value
func ExcludeFromMap ¶
ExcludeFromMap returns a new map excluding the specified keys
func FormatJSONValue ¶
func FormatJSONValue(value interface{}) string
FormatJSONValue formats a JSON value as a string for display
func GetAuthDisplayName ¶
GetAuthDisplayName returns a human-readable name for an auth type
func GetAuthIcon ¶
GetAuthIcon returns an appropriate icon for an auth type
func GetPathValue ¶
GetPathValue gets a value from a nested structure using dot notation path
func GetTriggerDisplayName ¶
func GetTriggerDisplayName(triggerType TriggerType) string
GetTriggerDisplayName returns a human-readable name for a trigger type
func GetTriggerIcon ¶
func GetTriggerIcon(triggerType TriggerType) string
GetTriggerIcon returns an icon name for a trigger type
func ParseJSONPath ¶
ParseJSONPath parses a JSON path and validates it
func PrettyPrint ¶ added in v0.11.0
func PrettyPrint(data interface{})
func RawJSONToAny ¶ added in v0.11.0
func RawJSONToAny(raw json.RawMessage) (any, error)
RawJSONToAny converts a json.RawMessage to an any type
func RemoveValue ¶
RemoveValue removes a value from a JSON object at the specified path
func SetPathValue ¶
func SetPathValue(obj map[string]interface{}, path string, value interface{}) (map[string]interface{}, bool)
SetPathValue sets a value in a nested structure using dot notation path
func ToJSONRaw ¶ added in v0.11.0
func ToJSONRaw(data any) (json.RawMessage, error)
ToJSONRaw converts any Go value to a raw JSON representation
func ToJSONRawPretty ¶ added in v0.11.0
func ToJSONRawPretty(data any) (json.RawMessage, error)
ToJSONRawPretty converts any Go value to a raw JSON representation with indentation
Types ¶
type APITriggerCriteria ¶
type APITriggerCriteria struct {
// Enabled determines if the API trigger is active
Enabled bool `json:"enabled"`
// Endpoint is the API endpoint path
Endpoint string `json:"endpoint,omitempty"`
// Method is the HTTP method for the API endpoint
Method string `json:"method,omitempty"`
// Authentication determines if authentication is required
Authentication bool `json:"authentication"`
// RequiredScope is the required OAuth scope
RequiredScope string `json:"requiredScope,omitempty"`
// InputSchema defines the expected input schema
InputSchema *smartform.FormSchema `json:"inputSchema,omitempty"`
// RateLimit is the maximum number of requests per minute
RateLimit int `json:"rateLimit,omitempty"`
}
APITriggerCriteria defines criteria for API-triggered workflows
func NewAPITriggerCriteria ¶
func NewAPITriggerCriteria() *APITriggerCriteria
NewAPITriggerCriteria creates a new APITriggerCriteria with default values
func (*APITriggerCriteria) SetDefaults ¶
func (c *APITriggerCriteria) SetDefaults()
SetDefaults applies default values to APITriggerCriteria
type ActionSettings ¶
type ActionSettings struct {
// Loop *LoopSettings `json:"loop,omitempty"`
Branch *BranchSettings `json:"branch,omitempty"`
Router *RouterSettings `json:"router,omitempty"`
}
type ActionType ¶
type ActionType string
ActionType defines the type of action in a workflow.
const ( // ActionTypeAction represents a standard action. ActionTypeAction ActionType = "ACTION" // ActionTypeBranch represents a branch action that can conditionally execute different paths. ActionTypeBranch ActionType = "BRANCH" // ActionTypeBoolean represents a boolean-conditional action. ActionTypeBoolean ActionType = "BOOLEAN" // ActionTypeLoop represents a loop action. ActionTypeLoop ActionType = "LOOP" // ActionTypeRouter represents a router action that can direct flow based on conditions. ActionTypeRouter ActionType = "ROUTER" )
func ActionTypeFromString ¶
func ActionTypeFromString(raw string) (ActionType, bool)
ActionTypeFromString determines the enum value with an exact case match.
func ActionTypeFromStringIgnoreCase ¶
func ActionTypeFromStringIgnoreCase(raw string) (ActionType, bool)
ActionTypeFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (ActionType) IsValid ¶
func (_j ActionType) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (ActionType) MarshalBinary ¶
func (_j ActionType) MarshalBinary() ([]byte, error)
MarshalBinary implements the encoding.BinaryMarshaler interface for ActionType.
func (ActionType) MarshalGQL ¶
func (_j ActionType) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface for ActionType.
func (ActionType) MarshalJSON ¶
func (_j ActionType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for ActionType.
func (ActionType) MarshalText ¶
func (_j ActionType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ActionType.
func (ActionType) MarshalYAML ¶
func (_j ActionType) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for ActionType.
func (ActionType) SQLTypeName ¶
func (ActionType) SQLTypeName() string
func (*ActionType) Scan ¶
func (_j *ActionType) Scan(value interface{}) error
Scan implements the sql/driver.Scanner interface for ActionType.
func (ActionType) String ¶
func (_j ActionType) String() string
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern ActionType(%d) instead.
func (*ActionType) UnmarshalBinary ¶
func (_j *ActionType) UnmarshalBinary(text []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for ActionType.
func (*ActionType) UnmarshalGQL ¶
func (_j *ActionType) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface for ActionType.
func (*ActionType) UnmarshalJSON ¶
func (_j *ActionType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ActionType.
func (*ActionType) UnmarshalText ¶
func (_j *ActionType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ActionType.
func (*ActionType) UnmarshalYAML ¶
func (_j *ActionType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for ActionType.
func (ActionType) Validate ¶
func (_j ActionType) Validate() error
Validate whether the value is within the range of enum values.
func (ActionType) Values ¶
func (ActionType) Values() []string
Values returns a slice of all String values of the enum.
type AuthMetadata ¶
type AuthMetadata struct {
// Type of authentication (oauth2, api_key, basic, etc.)
Type AuthType `json:"type"`
Schema *smartform.FormSchema `json:"schema"`
Required bool `json:"required"`
Inherit bool `json:"inherit"`
}
AuthMetadata defines the authentication configuration for an integration
type AuthType ¶
type AuthType string
AuthType defines the types of authentication supported by the system
const ( // None indicates no authentication is required None AuthType = "none" // Basic indicates username and password authentication Basic AuthType = "basic" // Secret indicates a shared secret or token authentication Secret AuthType = "secret" // APIKey indicates API key authentication APIKey AuthType = "api_key" // OAuth2 indicates OAuth 2.0 authentication OAuth2 AuthType = "oauth2" // Custom indicates a custom authentication method Custom AuthType = "custom" // JWT indicates JSON Web Token authentication JWT AuthType = "jwt" // ApiKeyHeader indicates an API key in the header ApiKeyHeader AuthType = "api_key_header" // ApiKeyQuery indicates an API key in the query string ApiKeyQuery AuthType = "api_key_query" // BearerToken indicates a bearer token authentication BearerToken AuthType = "bearer_token" // ClientCert indicates client certificate authentication ClientCert AuthType = "client_cert" )
func AuthTypeFromString ¶
AuthTypeFromString determines the enum value with an exact case match
func AuthTypeFromStringIgnoreCase ¶
AuthTypeFromStringIgnoreCase determines the enum value with a case-insensitive match
func (AuthType) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (AuthType) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler
func (AuthType) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (AuthType) MarshalText ¶
MarshalText implements encoding.TextMarshaler
func (AuthType) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler
func (AuthType) SQLTypeName ¶
SQLTypeName returns the SQL type name for serialization
func (*AuthType) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
func (*AuthType) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler
func (*AuthType) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*AuthType) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler
func (*AuthType) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler
type BranchMode ¶
type BranchMode string
BranchMode defines how branches in a workflow are selected.
const ( // BranchModeExpression uses a JavaScript expression to determine the branch BranchModeExpression BranchMode = "expression" // BranchModeCondition uses field-based condition matching BranchModeCondition BranchMode = "condition" // BranchModeValue uses direct value matching BranchModeValue BranchMode = "value" )
type BranchSettings ¶ added in v0.11.0
type BranchSettings struct {
// DefaultBranch specifies which branch to follow when no condition is met
DefaultBranch string `json:"defaultBranch,omitempty"`
// EvaluateAll determines if all branch conditions should be evaluated
// or only until the first match
EvaluateAll bool `json:"evaluateAll,omitempty"`
// Expression is a JavaScript expression that determines which branch to take
Expression string `json:"expression,omitempty"`
// ExpressionEngine defines which engine to use for expression evaluation
// Default is "javascript"
ExpressionEngine string `json:"expressionEngine,omitempty"`
// ConditionField is the specific field to evaluate in the step's output
ConditionField string `json:"conditionField,omitempty"`
// ConditionOperator defines how to compare the field value (equals, contains, etc.)
ConditionOperator string `json:"conditionOperator,omitempty"`
// ConditionValue is the value to compare against
ConditionValue interface{} `json:"conditionValue,omitempty"`
// AllowMultiPath determines if multiple branches can be activated simultaneously
AllowMultiPath bool `json:"allowMultiPath,omitempty"`
// BranchMode defines how branches are evaluated (expression, condition, or value)
BranchMode BranchMode `json:"branchMode,omitempty"`
// Branches defines the specific branches available
Branches []FlowRouter `json:"branches,omitempty"`
}
BranchSettings defines the configuration for a branching flow step.
func NewBranchSettings ¶
func NewBranchSettings() *BranchSettings
NewBranchSettings creates a new BranchSettings with default values
func (*BranchSettings) AddBranch ¶ added in v0.11.0
func (bs *BranchSettings) AddBranch(branch FlowRouter)
AddBranch adds a new branch to the BranchSettings
func (*BranchSettings) GetBranchByID ¶ added in v0.11.0
func (bs *BranchSettings) GetBranchByID(id string) *FlowRouter
GetBranchByID retrieves a branch by its ID
func (*BranchSettings) GetDefaultBranch ¶ added in v0.11.0
func (bs *BranchSettings) GetDefaultBranch() *FlowRouter
GetDefaultBranch gets the default branch
func (*BranchSettings) SetDefaultBranch ¶ added in v0.11.0
func (bs *BranchSettings) SetDefaultBranch(id string)
SetDefaultBranch sets a branch as the default
type DynamicOptionsFilterParams ¶ added in v0.11.0
type DynamicOptionsResponse ¶ added in v0.11.0
type DynamicOptionsResponse struct {
Metadata OffsetPaginationMeta `json:"metadata"`
Items any `json:"items"`
}
type Environment ¶ added in v0.11.0
type Environment string
Environment represents the execution environment
const ( // EnvironmentTest represents the test environment EnvironmentTest Environment = "test" // EnvironmentDebug represents the debug environment EnvironmentDebug Environment = "debug" // EnvironmentProd represents the production environment EnvironmentProd Environment = "prod" )
func ParseEnvironment ¶ added in v0.11.0
func ParseEnvironment(s string) (Environment, error)
ParseEnvironment parses a string into an Environment
func (Environment) IsDebug ¶ added in v0.11.0
func (e Environment) IsDebug() bool
IsDebug returns true if the environment is debug
func (Environment) IsProduction ¶ added in v0.11.0
func (e Environment) IsProduction() bool
IsProduction returns true if the environment is production
func (Environment) IsTest ¶ added in v0.11.0
func (e Environment) IsTest() bool
IsTest returns true if the environment is test
func (Environment) IsValid ¶ added in v0.11.0
func (e Environment) IsValid() bool
IsValid checks if the environment is valid
func (Environment) String ¶ added in v0.11.0
func (e Environment) String() string
String returns the string representation of the environment
type EventTriggerCriteria ¶
type EventTriggerCriteria struct {
// EventName specifies the name of the event to subscribe to
EventName string `json:"eventName" validate:"required"`
// Source specifies the source of the event
Source string `json:"source" validate:"required"`
// Filters allow refining event criteria
Filters map[string]any `json:"filters,omitempty"`
// EventPattern is a pattern to match against the event
EventPattern string `json:"eventPattern,omitempty"`
// MaxEvents is the maximum number of events to process at once
MaxEvents int `json:"maxEvents,omitempty"`
// Deduplicate determines if duplicate events should be filtered
Deduplicate bool `json:"deduplicate"`
// Batching determines if events should be batched
Batching bool `json:"batching"`
// BatchSize is the number of events to include in a batch
BatchSize int `json:"batchSize,omitempty"`
// BatchWindow is the time window for event batching
BatchWindow string `json:"batchWindow,omitempty"`
}
EventTriggerCriteria defines trigger criteria based on system or external events
func NewEventTriggerCriteria ¶
func NewEventTriggerCriteria() *EventTriggerCriteria
NewEventTriggerCriteria initializes a new EventTriggerCriteria instance with default values
func (*EventTriggerCriteria) SetDefaults ¶
func (c *EventTriggerCriteria) SetDefaults()
SetDefaults applies default values for EventTriggerCriteria
type FlowComponentType ¶ added in v0.11.0
type FlowComponentType string
FlowComponentType defines the specific type of flow component
const ( // FlowComponentTypeBranch represents a branching flow component FlowComponentTypeBranch FlowComponentType = "BRANCH" // FlowComponentTypeLoop represents a loop flow component FlowComponentTypeLoop FlowComponentType = "LOOP" // FlowComponentTypeCondition represents a condition flow component FlowComponentTypeCondition FlowComponentType = "CONDITION" // FlowComponentTypeRouter represents a router flow component FlowComponentTypeRouter FlowComponentType = "ROUTER" // FlowComponentTypeApproval represents an approval flow component FlowComponentTypeApproval FlowComponentType = "APPROVAL" // FlowComponentTypeDelay represents a delay flow component FlowComponentTypeDelay FlowComponentType = "DELAY" // FlowComponentTypeSubflow represents a subflow flow component FlowComponentTypeSubflow FlowComponentType = "SUBFLOW" )
func (*FlowComponentType) Scan ¶ added in v0.11.0
func (s *FlowComponentType) Scan(src interface{}) error
Scan implements the sql.Scanner interface.
func (FlowComponentType) Value ¶ added in v0.11.0
func (s FlowComponentType) Value() (driver.Value, error)
Value implements the driver.Valuer interface.
func (FlowComponentType) Values ¶ added in v0.11.0
func (FlowComponentType) Values() []string
Values provides list valid values for Enum.
type FlowRouter ¶
type FlowRouter struct {
// ID is the unique identifier of the branch
ID string `json:"id,omitempty"`
// Name is the display name of the branch
Name string `json:"name,omitempty"`
// Condition is the condition expression for this branch
Condition any `json:"condition,omitempty"`
// Value is the expected value for this branch
// (used with BranchModeValue)
Value interface{} `json:"value,omitempty"`
// Order determines the evaluation order of branches
Order int `json:"order,omitempty"`
// NextStep is the ID of the step to execute if this branch is selected
NextStep string `json:"nextStep,omitempty"`
// IsDefault indicates if this is the default branch
IsDefault bool `json:"isDefault,omitempty"`
// ConditionField is the specific field to evaluate for this branch
ConditionField string `json:"conditionField,omitempty"`
// ConditionOperator defines how to compare values for this branch
ConditionOperator string `json:"conditionOperator,omitempty"`
// ConditionValue is the value to compare against for this branch
ConditionValue interface{} `json:"conditionValue,omitempty"`
// Description is the description of the branch
Description string `json:"description,omitempty"`
}
FlowRouter represents a single branch option in a branching flow.
func NewFlowRouter ¶ added in v0.11.0
func NewFlowRouter(name string, nextStep string) *FlowRouter
NewFlowRouter creates a new branch with defaults
func (*FlowRouter) AsDefault ¶ added in v0.11.0
func (b *FlowRouter) AsDefault() *FlowRouter
AsDefault sets this branch as the default
func (*FlowRouter) WithCondition ¶ added in v0.11.0
func (b *FlowRouter) WithCondition(condition string) *FlowRouter
WithCondition adds a condition to the branch
func (*FlowRouter) WithFieldCondition ¶ added in v0.11.0
func (b *FlowRouter) WithFieldCondition(field string, operator string, value interface{}) *FlowRouter
WithFieldCondition sets up a field-based condition
func (*FlowRouter) WithOrder ¶ added in v0.11.0
func (b *FlowRouter) WithOrder(order int) *FlowRouter
WithOrder sets the order of the branch
func (*FlowRouter) WithValue ¶ added in v0.11.0
func (b *FlowRouter) WithValue(value interface{}) *FlowRouter
WithValue adds a value to the branch
type IntegrationBuildMetadata ¶
type IntegrationBuildMetadata struct {
Platform IntegrationPlatform `json:"compiler"`
Language IntegrationLanguage `json:"language,omitempty"`
}
IntegrationBuildMetadata is a build metadata for integrations.
type IntegrationLanguage ¶
type IntegrationLanguage string
IntegrationLanguage represents programming languages supported for plugins.
const ( IntegrationLanguageJavaScript IntegrationLanguage = "javascript" IntegrationLanguageTypeScript IntegrationLanguage = "typescript" IntegrationLanguagePython IntegrationLanguage = "python" IntegrationLanguageGo IntegrationLanguage = "go" IntegrationLanguageRuby IntegrationLanguage = "ruby" IntegrationLanguageJava IntegrationLanguage = "java" IntegrationLanguageCSharp IntegrationLanguage = "csharp" )
func IntegrationLanguageFromString ¶
func IntegrationLanguageFromString(raw string) (IntegrationLanguage, bool)
IntegrationLanguageFromString determines the enum value with an exact case match.
func (IntegrationLanguage) IsValid ¶
func (_j IntegrationLanguage) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (IntegrationLanguage) MarshalGQL ¶
func (_j IntegrationLanguage) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface for IntegrationLanguage.
func (IntegrationLanguage) MarshalJSON ¶
func (_j IntegrationLanguage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for IntegrationLanguage.
func (IntegrationLanguage) SQLTypeName ¶
func (IntegrationLanguage) SQLTypeName() string
func (IntegrationLanguage) String ¶
func (_j IntegrationLanguage) String() string
String returns the string of the enum value.
func (*IntegrationLanguage) UnmarshalGQL ¶
func (_j *IntegrationLanguage) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface for IntegrationLanguage.
func (*IntegrationLanguage) UnmarshalJSON ¶
func (_j *IntegrationLanguage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for IntegrationLanguage.
func (IntegrationLanguage) Validate ¶
func (_j IntegrationLanguage) Validate() error
Validate whether the value is within the range of enum values.
func (IntegrationLanguage) Values ¶
func (IntegrationLanguage) Values() []string
Values returns a slice of all String values of the enum.
type IntegrationPlatform ¶
type IntegrationPlatform string
IntegrationPlatform represents the type of a plugin.
const ( IntegrationPlatformNative IntegrationPlatform = "native" IntegrationPlatformWASM IntegrationPlatform = "wasm" )
func IntegrationPlatformFromString ¶
func IntegrationPlatformFromString(raw string) (IntegrationPlatform, bool)
IntegrationPlatformFromString determines the enum value with an exact case match.
func (IntegrationPlatform) IsValid ¶
func (_j IntegrationPlatform) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (IntegrationPlatform) MarshalJSON ¶
func (_j IntegrationPlatform) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for IntegrationPlatform.
func (IntegrationPlatform) SQLTypeName ¶
func (IntegrationPlatform) SQLTypeName() string
func (IntegrationPlatform) String ¶
func (_j IntegrationPlatform) String() string
String returns the string of the enum value.
func (*IntegrationPlatform) UnmarshalJSON ¶
func (_j *IntegrationPlatform) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for IntegrationPlatform.
func (IntegrationPlatform) Validate ¶
func (_j IntegrationPlatform) Validate() error
Validate whether the value is within the range of enum values.
func (IntegrationPlatform) Values ¶
func (IntegrationPlatform) Values() []string
Values returns a slice of all String values of the enum.
type JSONObject ¶
JSONObject is a type alias for map[string]any.
func ToJSONMap ¶
func ToJSONMap(input any) (JSONObject, bool)
ToJSONMap converts an interface of type `any` to a map[string]any. Returns the map and a boolean indicating success.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func NewLog ¶
func NewLog( projectID string, flowID string, stepRunID *string, onWrite func(WriteLogLineOpts), ) *Log
func (*Log) Debug ¶
func (b *Log) Debug() *LogBuilder
func (*Log) Error ¶
func (b *Log) Error() *LogBuilder
func (*Log) Info ¶
func (b *Log) Info() *LogBuilder
func (*Log) Warn ¶
func (b *Log) Warn() *LogBuilder
type LogBuilder ¶
type LogBuilder struct {
// contains filtered or unexported fields
}
func NewLogBuilder ¶
func NewLogBuilder( ops *WriteLogLineOpts, onWrite func(WriteLogLineOpts), ) *LogBuilder
func (*LogBuilder) Meta ¶
func (b *LogBuilder) Meta(meta map[string]interface{}) *LogBuilder
func (*LogBuilder) Msg ¶
func (b *LogBuilder) Msg(message string)
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time `json:"timestamp"` // Timestamp of the log
Level LogLevel `json:"level"` // Severity level of the log
Message string `json:"message"` // Log message itself
}
LogEntry represents a single log message with a timestamp and level.
type LogLine ¶
type LogLine struct {
// ID of the ent.
ID xid.ID `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ProjectID holds the value of the "team_id" field.
ProjectID xid.ID `json:"project_id,omitempty"`
// StepRunID holds the value of the "step_run_id" field.
StepRunID *string `json:"step_run_id,omitempty"`
// FlowID holds the value of the "step_run_id" field.
FlowID *string `json:"flow_id,omitempty"`
// Message holds the value of the "message" field.
Message string `json:"message,omitempty"`
// Level holds the value of the "level" field.
Level LogLineLevel `json:"level,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
LogLine is the model entity for the LogLine schema.
type LogLineLevel ¶
type LogLineLevel string
LogLineLevel represents the kind of job to be started.
const ( LogLineLevelDebug LogLineLevel = "DEBUG" LogLineLevelInfo LogLineLevel = "INFO" LogLineLevelWarn LogLineLevel = "WARN" LogLineLevelError LogLineLevel = "ERROR" )
Available job kinds.
func LogLineLevelFromString ¶
func LogLineLevelFromString(raw string) (LogLineLevel, bool)
LogLineLevelFromString determines the enum value with an exact case match.
func LogLineLevelFromStringIgnoreCase ¶
func LogLineLevelFromStringIgnoreCase(raw string) (LogLineLevel, bool)
LogLineLevelFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (LogLineLevel) IsValid ¶
func (_j LogLineLevel) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (LogLineLevel) MarshalBinary ¶
func (_j LogLineLevel) MarshalBinary() ([]byte, error)
MarshalBinary implements the encoding.BinaryMarshaler interface for LogLineLevel.
func (LogLineLevel) MarshalGQL ¶
func (_j LogLineLevel) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface for LogLineLevel.
func (LogLineLevel) MarshalJSON ¶
func (_j LogLineLevel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for LogLineLevel.
func (LogLineLevel) MarshalText ¶
func (_j LogLineLevel) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for LogLineLevel.
func (LogLineLevel) MarshalYAML ¶
func (_j LogLineLevel) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for LogLineLevel.
func (LogLineLevel) SQLTypeName ¶
func (LogLineLevel) SQLTypeName() string
func (*LogLineLevel) Scan ¶
func (_j *LogLineLevel) Scan(value interface{}) error
Scan implements the sql/driver.Scanner interface for LogLineLevel.
func (LogLineLevel) String ¶
func (_j LogLineLevel) String() string
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern LogLineLevel(%d) instead.
func (*LogLineLevel) UnmarshalBinary ¶
func (_j *LogLineLevel) UnmarshalBinary(text []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for LogLineLevel.
func (*LogLineLevel) UnmarshalGQL ¶
func (_j *LogLineLevel) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface for LogLineLevel.
func (*LogLineLevel) UnmarshalJSON ¶
func (_j *LogLineLevel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for LogLineLevel.
func (*LogLineLevel) UnmarshalText ¶
func (_j *LogLineLevel) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for LogLineLevel.
func (*LogLineLevel) UnmarshalYAML ¶
func (_j *LogLineLevel) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for LogLineLevel.
func (LogLineLevel) Validate ¶
func (_j LogLineLevel) Validate() error
Validate whether the value is within the range of enum values.
func (LogLineLevel) Values ¶
func (LogLineLevel) Values() []string
Values returns a slice of all String values of the enum.
type LogSink ¶
type LogSink interface {
Write(ctx context.Context, logEntry LogEntry) error // Write a log entry to the sink
}
LogSink defines an interface for persisting logs to external systems.
type Logger ¶
type Logger interface {
AddLog(level LogLevel, message string, a ...any)
SetPrefix(prefix string)
GetLogs() []LogEntry
ClearLogs()
Info(message string)
Infof(message string, a ...any)
Warn(message string)
Warnf(message string, a ...any)
Error(err error)
Errorf(err error, message string, a ...any)
Debug(message string)
Debugf(message string, a ...any)
WithField(key string, value interface{}) Logger
WithFields(fields map[string]interface{}) Logger
Clone() Logger
}
Logger provides a centralized interface for managing logs.
func NewNoopLogger ¶ added in v0.11.0
func NewNoopLogger() Logger
type ManualTriggerCriteria ¶
type ManualTriggerCriteria struct {
// Description is an optional field to describe the purpose of the manual trigger
Description string `json:"description,omitempty"`
// UserInputSchema defines a schema for the input required when triggering manually
UserInputSchema *smartform.FormSchema `json:"userInputSchema,omitempty"`
// RequireApproval specifies if the manual trigger requires prior approval to execute
RequireApproval bool `json:"requireApproval"`
// ExecutionTimeout defines the maximum allowed time for the manual step to be completed
ExecutionTimeout *time.Duration `json:"executionTimeout,omitempty"`
// Approvers is a list of users who can approve the trigger
Approvers []string `json:"approvers,omitempty"`
// ApproverGroups is a list of groups who can approve the trigger
ApproverGroups []string `json:"approverGroups,omitempty"`
// Tags provide searchable metadata for this trigger
Tags []string `json:"tags,omitempty"`
// ShowInUI determines if this trigger should be visible in the UI
ShowInUI bool `json:"showInUI"`
// ButtonLabel is the text to display on the trigger button
ButtonLabel string `json:"buttonLabel,omitempty"`
// ButtonIcon is the icon to display on the trigger button
ButtonIcon string `json:"buttonIcon,omitempty"`
}
ManualTriggerCriteria defines criteria for manually triggered workflows
func NewManualTriggerCriteria ¶
func NewManualTriggerCriteria() *ManualTriggerCriteria
NewManualTriggerCriteria creates a new instance of ManualTriggerCriteria with default values
func (*ManualTriggerCriteria) SetDefaults ¶
func (c *ManualTriggerCriteria) SetDefaults()
SetDefaults applies default values for ManualTriggerCriteria
type MessageTriggerCriteria ¶
type MessageTriggerCriteria struct {
// MessageType is the type of message that triggers the workflow
MessageType string `json:"messageType,omitempty"`
// Source is the source of the message
Source string `json:"source,omitempty"`
// Destination is the destination of the message
Destination string `json:"destination,omitempty"`
// Filter is a filter expression applied to the message
Filter string `json:"filter,omitempty"`
// Enabled determines if the message trigger is active
Enabled bool `json:"enabled"`
}
MessageTriggerCriteria defines criteria for message-triggered workflows
func NewMessageTriggerCriteria ¶
func NewMessageTriggerCriteria() *MessageTriggerCriteria
NewMessageTriggerCriteria creates a new MessageTriggerCriteria with default values
func (*MessageTriggerCriteria) SetDefaults ¶
func (c *MessageTriggerCriteria) SetDefaults()
SetDefaults applies default values to MessageTriggerCriteria
type NoopLogger ¶ added in v0.11.0
type NoopLogger struct {
// contains filtered or unexported fields
}
func (*NoopLogger) AddLog ¶ added in v0.11.0
func (n *NoopLogger) AddLog(level LogLevel, message string, a ...any)
func (*NoopLogger) AddLogMessage ¶ added in v0.11.0
func (n *NoopLogger) AddLogMessage(level LogLevel, message string)
func (*NoopLogger) ClearLogs ¶ added in v0.11.0
func (n *NoopLogger) ClearLogs()
func (*NoopLogger) Clone ¶ added in v0.11.0
func (n *NoopLogger) Clone() Logger
func (*NoopLogger) Debug ¶ added in v0.11.0
func (n *NoopLogger) Debug(message string)
func (*NoopLogger) Debugf ¶ added in v0.11.0
func (n *NoopLogger) Debugf(message string, a ...any)
func (*NoopLogger) Error ¶ added in v0.11.0
func (n *NoopLogger) Error(err error)
func (*NoopLogger) Errorf ¶ added in v0.11.0
func (n *NoopLogger) Errorf(err error, message string, a ...any)
func (*NoopLogger) GetLogs ¶ added in v0.11.0
func (n *NoopLogger) GetLogs() []LogEntry
func (*NoopLogger) Info ¶ added in v0.11.0
func (n *NoopLogger) Info(message string)
func (*NoopLogger) Infof ¶ added in v0.11.0
func (n *NoopLogger) Infof(message string, a ...any)
func (*NoopLogger) SetPrefix ¶ added in v0.11.0
func (n *NoopLogger) SetPrefix(prefix string)
func (*NoopLogger) Warn ¶ added in v0.11.0
func (n *NoopLogger) Warn(message string)
func (*NoopLogger) Warnf ¶ added in v0.11.0
func (n *NoopLogger) Warnf(message string, a ...any)
func (*NoopLogger) WithField ¶ added in v0.11.0
func (n *NoopLogger) WithField(key string, value interface{}) Logger
func (*NoopLogger) WithFields ¶ added in v0.11.0
func (n *NoopLogger) WithFields(fields map[string]interface{}) Logger
type OffsetPaginationMeta ¶ added in v0.11.0
type PollingTriggerCriteria ¶
type PollingTriggerCriteria struct {
// Interval defines the duration between each poll
Interval time.Duration `json:"interval" validate:"required,gt=0"`
// MinInterval defines the duration between each poll
MinInterval time.Duration `json:"minInterval" validate:"required,gt=0"`
// MaxInterval defines the duration between each poll
MaxInterval time.Duration `json:"maxInterval" validate:"required,gt=0"`
// MaxRetries specifies the maximum number of retries in case polling fails
MaxRetries int `json:"maxRetries,omitempty" validate:"min=0"`
// FetchLimit defines the maximum number of items to fetch per poll
FetchLimit int `json:"fetchLimit,omitempty" validate:"min=1"`
// DataFilters allows specifying conditions for the data being fetched
DataFilters map[string]any `json:"dataFilters,omitempty"`
// AllowEmptyData determines if polling should proceed without error when no data is returned
AllowEmptyData bool `json:"allowEmptyData"`
// LastExecutionTime holds the timestamp of the last successful poll
LastExecutionTime *time.Time `json:"lastExecutionTime,omitempty"`
// Enabled determines whether the polling trigger is active
Enabled bool `json:"enabled" validate:"required"`
// ExcludedDays allows specifying days when polling should be skipped
ExcludedDays []time.Weekday `json:"excludedDays,omitempty"`
// ExcludedHours allows specifying hours when polling should be skipped
ExcludedHours []int `json:"excludedHours,omitempty"`
// TimeoutSeconds is the maximum time allowed for a polling operation
TimeoutSeconds int `json:"timeoutSeconds,omitempty"`
// Deduplicate determines if duplicate items should be filtered
Deduplicate bool `json:"deduplicate"`
// DedupKeyPath is the path to the field used for deduplication
DedupKeyPath string `json:"dedupKeyPath,omitempty"`
}
PollingTriggerCriteria defines criteria for a polling-based trigger
func NewPollingTriggerCriteria ¶
func NewPollingTriggerCriteria() *PollingTriggerCriteria
NewPollingTriggerCriteria initializes and returns a new PollingTriggerCriteria instance with default values
func (*PollingTriggerCriteria) SetDefaults ¶
func (c *PollingTriggerCriteria) SetDefaults()
SetDefaults applies default values for PollingTriggerCriteria
type RetryPolicy ¶
type RetryPolicy struct {
// Enabled determines if retry is enabled
Enabled bool `json:"enabled" validate:"required"`
// MaxRetries specifies the maximum number of retry attempts
MaxRetries int `json:"maxRetries" validate:"min=0"`
// RetryInterval defines the time to wait between retry attempts
RetryInterval time.Duration `json:"retryInterval" validate:"gt=0"`
// ExponentialBackoff determines if exponential backoff is used for retries
ExponentialBackoff bool `json:"exponentialBackoff"`
// MaxInterval is the maximum interval between retries when using exponential backoff
MaxInterval time.Duration `json:"maxInterval,omitempty"`
// RetryableErrors defines which errors should be retried
RetryableErrors []string `json:"retryableErrors,omitempty"`
}
RetryPolicy defines the retry policy for failed event triggers
func NewRetryPolicy ¶
func NewRetryPolicy() *RetryPolicy
NewRetryPolicy creates a new RetryPolicy with default values
func (*RetryPolicy) SetDefaults ¶
func (rp *RetryPolicy) SetDefaults()
SetDefaults applies default values for RetryPolicy
type RouterSettings ¶
type RouterSettings struct {
Type RouterType `json:"type,omitempty"`
// DefaultBranch specifies which branch to follow when no condition is met
DefaultBranch string `json:"defaultBranch,omitempty"`
// EvaluateAll determines if all branch conditions should be evaluated
// or only until the first match
EvaluateAll bool `json:"evaluateAll,omitempty"`
// Expression is a JavaScript expression that determines which branch to take
Expression string `json:"expression,omitempty"`
// ExpressionEngine defines which engine to use for expression evaluation
// Default is "javascript"
ExpressionEngine string `json:"expressionEngine,omitempty"`
// ConditionField is the specific field to evaluate in the step's output
ConditionField string `json:"conditionField,omitempty"`
// ConditionOperator defines how to compare the field value (equals, contains, etc.)
ConditionOperator string `json:"conditionOperator,omitempty"`
// ConditionValue is the value to compare against
ConditionValue interface{} `json:"conditionValue,omitempty"`
// AllowMultiPath determines if multiple branches can be activated simultaneously
AllowMultiPath bool `json:"allowMultiPath,omitempty"`
// BranchMode defines how branches are evaluated (expression, condition, or value)
BranchMode BranchMode `json:"branchMode,omitempty"`
// Branches defines the specific branches available
Branches []FlowRouter `json:"branches,omitempty"`
}
RouterSettings defines the configuration for a branching flow step.
func NewRouterSettings ¶ added in v0.11.0
func NewRouterSettings() *RouterSettings
NewRouterSettings creates a new BranchSettings with default values
func (*RouterSettings) AddBranch ¶
func (bs *RouterSettings) AddBranch(branch FlowRouter)
AddBranch adds a new branch to the RouterSettings
func (*RouterSettings) GetBranchByID ¶
func (bs *RouterSettings) GetBranchByID(id string) *FlowRouter
GetBranchByID retrieves a branch by its ID
func (*RouterSettings) GetDefaultBranch ¶
func (bs *RouterSettings) GetDefaultBranch() *FlowRouter
GetDefaultBranch gets the default branch
func (*RouterSettings) SetDefaultBranch ¶
func (bs *RouterSettings) SetDefaultBranch(id string)
SetDefaultBranch sets a branch as the default
type RouterType ¶ added in v0.11.0
type RouterType string
RouterType defines the type of router.
const ( // RouterTypeSwitch routes based on evaluating an expression and matching the result. RouterTypeSwitch RouterType = "switch" // RouterTypeCondition routes based on evaluating multiple conditions and taking the first match. RouterTypeCondition RouterType = "condition" // RouterTypeMultiPath allows taking multiple paths if their conditions are true. RouterTypeMultiPath RouterType = "multipath" )
type ScheduleTriggerCriteria ¶
type ScheduleTriggerCriteria struct {
// CronExpression specifies the schedule using a cron expression
CronExpression string `json:"cronExpression" validate:"required,cron"`
// StartTime specifies the time to begin the schedule execution
StartTime *time.Time `json:"startTime,omitempty"`
// EndTime specifies the time to stop the schedule execution
EndTime *time.Time `json:"endTime,omitempty"`
// TimeZone allows defining the time zone for the cron schedule
TimeZone string `json:"timeZone" validate:"required"`
// Enabled determines if the schedule trigger is active
Enabled bool `json:"enabled" validate:"required"`
// MaxConcurrentRuns is the maximum number of concurrent runs
MaxConcurrentRuns int `json:"maxConcurrentRuns,omitempty"`
// SkipIfPreviousRunning determines if a run should be skipped if the previous one is still running
SkipIfPreviousRunning bool `json:"skipIfPreviousRunning"`
// MissedRunPolicy defines what to do with missed runs (skip, run-once, run-all)
MissedRunPolicy string `json:"missedRunPolicy,omitempty"`
// Description provides additional information about the schedule
Description string `json:"description,omitempty"`
}
ScheduleTriggerCriteria defines trigger criteria for scheduled workflows
func NewScheduleTriggerCriteria ¶
func NewScheduleTriggerCriteria() *ScheduleTriggerCriteria
NewScheduleTriggerCriteria creates a new ScheduleTriggerCriteria with default values
func (*ScheduleTriggerCriteria) ApplyDefaults ¶
func (c *ScheduleTriggerCriteria) ApplyDefaults()
ApplyDefaults applies default values to a ScheduleTriggerCriteria
func (*ScheduleTriggerCriteria) ScheduledInterval ¶
func (c *ScheduleTriggerCriteria) ScheduledInterval() time.Duration
ScheduledInterval derives the scheduled interval as a time.Duration based on the cron expression
type StepRunStatus ¶
type StepRunStatus string
StepRunStatus represents the status of a step run.
const ( // StepRunStatusPending indicates a step is queued to run but hasn't started StepRunStatusPending StepRunStatus = "PENDING" // StepRunStatusPaused indicates a step is paused and waiting for manual continuation StepRunStatusPaused StepRunStatus = "PAUSED" // StepRunStatusRunning indicates a step is currently executing StepRunStatusRunning StepRunStatus = "RUNNING" // StepRunStatusSucceeded indicates a step has completed successfully StepRunStatusSucceeded StepRunStatus = "SUCCEEDED" // StepRunStatusFailed indicates a step has failed StepRunStatusFailed StepRunStatus = "FAILED" // StepRunStatusCancelled indicates a step was manually cancelled StepRunStatusCancelled StepRunStatus = "CANCELLED" // StepRunStatusSkipped indicates a step was skipped due to conditions or branching StepRunStatusSkipped StepRunStatus = "SKIPPED" // StepRunStatusTimeout indicates a step exceeded its allowed execution time StepRunStatusTimeout StepRunStatus = "TIMEOUT" // StepRunStatusWaiting indicates a step is waiting for an external event or condition StepRunStatusWaiting StepRunStatus = "WAITING" // StepRunStatusBlocked indicates a step is blocked by a dependency or condition StepRunStatusBlocked StepRunStatus = "BLOCKED" // StepRunStatusApproved indicates a step has been manually approved StepRunStatusApproved StepRunStatus = "APPROVED" // StepRunStatusRejected indicates a step was manually rejected StepRunStatusRejected StepRunStatus = "REJECTED" StepRunStatusRetrying StepRunStatus = "RETRY" )
Enum values for StepRunStatus.
func StepRunStatusFromString ¶
func StepRunStatusFromString(raw string) (StepRunStatus, bool)
StepRunStatusFromString determines the enum value with an exact case match.
func StepRunStatusFromStringIgnoreCase ¶
func StepRunStatusFromStringIgnoreCase(raw string) (StepRunStatus, bool)
StepRunStatusFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (StepRunStatus) IsActive ¶
func (s StepRunStatus) IsActive() bool
IsActive returns true if the status indicates the step is still active
func (StepRunStatus) IsComplete ¶
func (s StepRunStatus) IsComplete() bool
IsComplete returns true if the status indicates the step has finished
func (StepRunStatus) IsFailed ¶
func (s StepRunStatus) IsFailed() bool
func (StepRunStatus) IsSuccessful ¶
func (s StepRunStatus) IsSuccessful() bool
IsSuccessful returns true if the status indicates successful completion
func (StepRunStatus) IsTerminalStatus ¶
func (s StepRunStatus) IsTerminalStatus() bool
func (StepRunStatus) IsValid ¶
func (_j StepRunStatus) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (StepRunStatus) MarshalBinary ¶
func (_j StepRunStatus) MarshalBinary() ([]byte, error)
MarshalBinary implements the encoding.BinaryMarshaler interface for StepRunStatus.
func (StepRunStatus) MarshalGQL ¶
func (_j StepRunStatus) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface for StepRunStatus.
func (StepRunStatus) MarshalJSON ¶
func (_j StepRunStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for StepRunStatus.
func (StepRunStatus) MarshalText ¶
func (_j StepRunStatus) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for StepRunStatus.
func (StepRunStatus) MarshalYAML ¶
func (_j StepRunStatus) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for StepRunStatus.
func (StepRunStatus) SQLTypeName ¶
func (StepRunStatus) SQLTypeName() string
SQLTypeName returns the SQL type name for serialization
func (*StepRunStatus) Scan ¶
func (_j *StepRunStatus) Scan(value interface{}) error
Scan implements the sql/driver.Scanner interface for StepRunStatus.
func (StepRunStatus) StatusColor ¶
func (s StepRunStatus) StatusColor() string
StatusColor returns a color associated with this status for UI display
func (StepRunStatus) StatusIcon ¶
func (s StepRunStatus) StatusIcon() string
StatusIcon returns an icon associated with this status for UI display
func (StepRunStatus) String ¶
func (_j StepRunStatus) String() string
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern StepRunStatus(%d) instead.
func (*StepRunStatus) UnmarshalBinary ¶
func (_j *StepRunStatus) UnmarshalBinary(text []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for StepRunStatus.
func (*StepRunStatus) UnmarshalGQL ¶
func (_j *StepRunStatus) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface for StepRunStatus.
func (*StepRunStatus) UnmarshalJSON ¶
func (_j *StepRunStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for StepRunStatus.
func (*StepRunStatus) UnmarshalText ¶
func (_j *StepRunStatus) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for StepRunStatus.
func (*StepRunStatus) UnmarshalYAML ¶
func (_j *StepRunStatus) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for StepRunStatus.
func (StepRunStatus) Validate ¶
func (_j StepRunStatus) Validate() error
Validate whether the value is within the range of enum values.
func (StepRunStatus) Values ¶
func (StepRunStatus) Values() []string
Values returns a slice of all String values of the enum.
type SystemActivityLog ¶
type SystemActivityLogs ¶
type SystemActivityLogs = []SystemActivityLog
type TriggerCriteria ¶
type TriggerCriteria struct {
// Polling specifies the configuration for polling-based triggers
Polling *PollingTriggerCriteria `json:"pollingCriteria,omitempty"`
// Event specifies the configuration for event-based triggers
Event *EventTriggerCriteria `json:"eventCriteria,omitempty"`
// Manual specifies the configuration for manual triggers
Manual *ManualTriggerCriteria `json:"manualCriteria,omitempty"`
// Webhook specifies the configuration for webhook triggers
Webhook *WebhookTriggerCriteria `json:"webhookCriteria,omitempty"`
// Schedule specifies the configuration for scheduled triggers
Schedule *ScheduleTriggerCriteria `json:"scheduleCriteria,omitempty"`
// API specifies the configuration for API triggers
API *APITriggerCriteria `json:"apiCriteria,omitempty"`
// Workflow specifies the configuration for workflow triggers
Workflow *WorkflowTriggerCriteria `json:"workflowCriteria,omitempty"`
// Message specifies the configuration for message triggers
Message *MessageTriggerCriteria `json:"messageCriteria,omitempty"`
}
TriggerCriteria defines the settings and criteria for configuring triggers
func NewTriggerCriteria ¶
func NewTriggerCriteria() *TriggerCriteria
NewTriggerCriteria creates a new TriggerCriteria with default values
func (*TriggerCriteria) SetDefaultByType ¶
func (ts *TriggerCriteria) SetDefaultByType(strategy TriggerType)
SetDefaultByType applies default values to TriggerCriteria based on trigger type
func (*TriggerCriteria) SetDefaults ¶
func (ts *TriggerCriteria) SetDefaults()
SetDefaults applies default values to TriggerCriteria
type TriggerSettings ¶
type TriggerSettings struct {
// Type defines the trigger type
Type TriggerType `json:"strategy,omitempty" validate:"required,oneof=SCHEDULED EVENT POLLING WEBHOOK MANUAL API WORKFLOW MESSAGE BUTTON"`
// Criteria contains the configuration settings for the trigger
Criteria *TriggerCriteria `json:"criteria,omitempty"`
// RetryPolicy specifies the retry behavior for failed triggers
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
// Description provides additional information about the trigger
Description string `json:"description,omitempty"`
// Tags provide searchable metadata for the trigger
Tags []string `json:"tags,omitempty"`
// Priority determines the execution priority when multiple triggers fire
Priority int `json:"priority,omitempty"`
}
TriggerSettings defines the settings for a trigger
func NewTriggerSettings ¶
func NewTriggerSettings() *TriggerSettings
NewTriggerSettings creates a new TriggerSettings with default values
func (*TriggerSettings) SetDefaultByType ¶
func (ts *TriggerSettings) SetDefaultByType(strategy TriggerType)
SetDefaultByType applies default values to TriggerSettings based on trigger type
func (*TriggerSettings) SetDefaults ¶
func (ts *TriggerSettings) SetDefaults()
SetDefaults applies default values to TriggerSettings
type TriggerType ¶
type TriggerType string
TriggerType defines how a workflow can be triggered
const ( // TriggerTypeScheduled indicates a workflow triggered by a schedule TriggerTypeScheduled TriggerType = "SCHEDULED" // TriggerTypeEvent indicates a workflow triggered by an event TriggerTypeEvent TriggerType = "EVENT" TriggerTypePubsub TriggerType = "PUBSUB" // TriggerTypePolling indicates a workflow triggered by polling for changes TriggerTypePolling TriggerType = "POLLING" // TriggerTypeWebhook indicates a workflow triggered by a webhook TriggerTypeWebhook TriggerType = "WEBHOOK" // TriggerTypeManual indicates a workflow triggered manually by a user TriggerTypeManual TriggerType = "MANUAL" // TriggerTypeAPI indicates a workflow triggered via the API TriggerTypeAPI TriggerType = "API" // TriggerTypeWorkflow indicates a workflow triggered by another workflow TriggerTypeWorkflow TriggerType = "WORKFLOW" // TriggerTypeMessage indicates a workflow triggered by a message TriggerTypeMessage TriggerType = "MESSAGE" // TriggerTypeButton indicates a workflow triggered by a button click TriggerTypeButton TriggerType = "BUTTON" )
func TriggerTypeFromString ¶
func TriggerTypeFromString(raw string) (TriggerType, bool)
TriggerTypeFromString determines the enum value with an exact case match
func TriggerTypeFromStringIgnoreCase ¶
func TriggerTypeFromStringIgnoreCase(raw string) (TriggerType, bool)
TriggerTypeFromStringIgnoreCase determines the enum value with a case-insensitive match
func (TriggerType) IsValid ¶
func (_j TriggerType) IsValid() bool
IsValid tests whether the value is a valid enum value
func (TriggerType) MarshalBinary ¶
func (_j TriggerType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (TriggerType) MarshalGQL ¶
func (_j TriggerType) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler
func (TriggerType) MarshalJSON ¶
func (_j TriggerType) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (TriggerType) MarshalText ¶
func (_j TriggerType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler
func (TriggerType) MarshalYAML ¶
func (_j TriggerType) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler
func (TriggerType) RequiresConfiguration ¶
func (t TriggerType) RequiresConfiguration() bool
RequiresConfiguration returns true if the trigger type needs additional configuration
func (TriggerType) SQLTypeName ¶
func (TriggerType) SQLTypeName() string
SQLTypeName returns the SQL type name for serialization
func (*TriggerType) Scan ¶
func (_j *TriggerType) Scan(value interface{}) error
Scan implements sql/driver.Scanner
func (TriggerType) String ¶
func (_j TriggerType) String() string
String returns the string of the enum value
func (TriggerType) SupportsManualTrigger ¶
func (t TriggerType) SupportsManualTrigger() bool
SupportsManualTrigger returns true if the trigger type supports manual triggering
func (TriggerType) SupportsPolling ¶
func (t TriggerType) SupportsPolling() bool
SupportsPolling returns true if the trigger type supports polling
func (TriggerType) SupportsScheduling ¶
func (t TriggerType) SupportsScheduling() bool
SupportsScheduling returns true if the trigger type supports scheduling
func (TriggerType) SupportsWebhook ¶
func (t TriggerType) SupportsWebhook() bool
SupportsWebhook returns true if the trigger type supports webhooks
func (*TriggerType) UnmarshalBinary ¶
func (_j *TriggerType) UnmarshalBinary(text []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
func (*TriggerType) UnmarshalGQL ¶
func (_j *TriggerType) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements graphql.Unmarshaler
func (*TriggerType) UnmarshalJSON ¶
func (_j *TriggerType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*TriggerType) UnmarshalText ¶
func (_j *TriggerType) UnmarshalText(text []byte) error
UnmarshalText implements encoding.TextUnmarshaler
func (*TriggerType) UnmarshalYAML ¶
func (_j *TriggerType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler
func (TriggerType) Validate ¶
func (_j TriggerType) Validate() error
Validate whether the value is within the range of enum values
func (TriggerType) Values ¶
func (TriggerType) Values() []string
Values returns a slice of all String values of the enum
type WebhookTriggerCriteria ¶
type WebhookTriggerCriteria struct {
// Endpoint is the URL where the webhook should listen for incoming requests
Endpoint string `json:"endpoint" validate:"required,url"`
// HttpMethod specifies the HTTP method for the webhook
HttpMethod string `json:"httpMethod" validate:"required,oneof=GET POST PUT DELETE"`
// AuthEnabled determines if the webhook requires authentication
AuthEnabled bool `json:"authEnabled"`
// Headers specify required headers that must be included in the webhook requests
Headers map[string]string `json:"headers,omitempty"`
// QueryParams define required query parameters for validation
QueryParams map[string]string `json:"queryParams,omitempty"`
// ValidationSecret is used to validate webhook requests
ValidationSecret *string `json:"validationSecret,omitempty"`
// Enabled determines if the webhook trigger is active
Enabled bool `json:"enabled" validate:"required"`
// ResponseTemplate is a template for the webhook response
ResponseTemplate string `json:"responseTemplate,omitempty"`
// StatusCode is the HTTP status code to return
StatusCode int `json:"statusCode,omitempty"`
// PayloadPath is the path to extract the payload from the request
PayloadPath string `json:"payloadPath,omitempty"`
// ContentType is the expected content type of the webhook request
ContentType string `json:"contentType,omitempty"`
BasePath string `json:"basePath,omitempty"`
SecretHeader string `json:"secretHeader,omitempty"`
}
WebhookTriggerCriteria defines the criteria for triggering via webhook
func NewWebhookTriggerCriteria ¶
func NewWebhookTriggerCriteria() *WebhookTriggerCriteria
NewWebhookTriggerCriteria creates a new instance of WebhookTriggerCriteria with default values
func (*WebhookTriggerCriteria) SetDefaults ¶
func (c *WebhookTriggerCriteria) SetDefaults()
SetDefaults applies default values for WebhookTriggerCriteria
type WorkflowTriggerCriteria ¶
type WorkflowTriggerCriteria struct {
// SourceWorkflowID is the ID of the source workflow
SourceWorkflowID string `json:"sourceWorkflowId,omitempty"`
// TriggerOnEvents determines which events trigger the workflow
TriggerOnEvents []string `json:"triggerOnEvents,omitempty"`
// InputMapping defines how to map source workflow outputs to this workflow inputs
InputMapping map[string]string `json:"inputMapping,omitempty"`
// Condition is a condition that must be met for the trigger to fire
Condition string `json:"condition,omitempty"`
// Enabled determines if the workflow trigger is active
Enabled bool `json:"enabled"`
}
WorkflowTriggerCriteria defines criteria for workflow-triggered workflows
func NewWorkflowTriggerCriteria ¶
func NewWorkflowTriggerCriteria() *WorkflowTriggerCriteria
NewWorkflowTriggerCriteria creates a new WorkflowTriggerCriteria with default values
func (*WorkflowTriggerCriteria) SetDefaults ¶
func (c *WorkflowTriggerCriteria) SetDefaults()
SetDefaults applies default values to WorkflowTriggerCriteria
type WriteLogLineOpts ¶
type WriteLogLineOpts struct {
// The step run id
ProjectID string `json:"project_id" validate:"required,uuid"`
// The step run id
StepRunID *string `json:"step_run_id" validate:"omitnil,uuid"`
// The flow run id
FlowID string `json:"flow_id" validate:"uuid"`
// (optional) The time when the log line was created.
CreatedAt *time.Time
// (required) The message of the log line.
Message string `json:"message" validate:"required,min=1,max=10000"`
// (optional) The level of the log line.
Level *string `json:"level" validate:"omitnil,oneof=INFO ERROR WARN DEBUG"`
// (optional) The metadata of the log line.
Metadata map[string]any `json:"metadata"`
}