workflow

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedWorkflowTransition = errors.New("unsupported transition")
	ErrParsingTemplate               = errors.New("error parsing notification template")
	ErrExecutingTemplate             = errors.New("error executing notification template")
	ErrMarshallingPayload            = errors.New("error marshalling notification payload")
)

Functions

This section is empty.

Types

type Creator

type Creator struct {
	// contains filtered or unexported fields
}

func NewWorkflowCreator

func NewWorkflowCreator(config *config.Config) (*Creator, error)

func (*Creator) CreateTask

func (w *Creator) CreateTask(data NotificationData, recipients []string) (*asynq.Task, error)

type NotificationData

type NotificationData struct {
	Tenant     model.Tenant
	Workflow   model.Workflow
	Transition wf.Transition
}

NotificationData holds workflow-specific notification data

func (NotificationData) GetType

func (w NotificationData) GetType() string

type NotificationTemplateData

type NotificationTemplateData struct {
	HeaderTitle         string
	Message             string
	InfoTitle           string
	WorkflowURL         string
	TenantID            string
	TenantRegion        string
	Landscape           string
	ActionText          string
	InitiatorName       string
	WorkflowDescription string
}

NotificationTemplateData contains all data needed for the HTML template

Jump to

Keyboard shortcuts

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