event

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WechatOrderEventName 接收企业微信 OA 事件
	WechatOrderEventName = "wechat_order_events"
	// CreateProcessEventName 创建流程事件
	CreateProcessEventName = "create_process_events"
	// OrderStatusModifyEventName 修改状态事件
	OrderStatusModifyEventName = "order_status_modify_events"
	// FeishuCallbackEventName 飞书回调事件
	FeishuCallbackEventName = "feishu_callback_events"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateProcessEventProducer

type CreateProcessEventProducer interface {
	Produce(ctx context.Context, evt OrderEvent) error
}

func NewCreateProcessEventProducer

func NewCreateProcessEventProducer(q mq.MQ) (CreateProcessEventProducer, error)

type FeishuCallback added in v1.6.0

type FeishuCallback struct {
	Action       string `json:"action"`
	MessageId    string `json:"message_id"`
	FeishuUserId string `json:"feishu_user_id"`
	TaskId       string `json:"task_id"`
	Comment      string `json:"comment"`
	OrderId      string `json:"order_id"`
}

type OrderEvent

type OrderEvent struct {
	Id         int64                  `json:"id"`
	WorkflowId int64                  `json:"workflow_id"`
	Provide    Provide                `json:"provide"`
	Data       map[string]interface{} `json:"data"`
	// 流程引擎使用的变量, 根据这样可以定制express判断公式
	Variables string `json:"variables"`
}

type OrderStatusModifyEvent

type OrderStatusModifyEvent struct {
	ProcessInstanceId int    `json:"process_instance_id"`
	Status            Status `json:"status"`
}

type Provide

type Provide uint8
const (
	// SYSTEM 本系统
	SYSTEM Provide = 1
	// WECHAT 企业微信
	WECHAT Provide = 2
)

func (Provide) ToUint8

func (s Provide) ToUint8() uint8

type Status

type Status uint8

func (Status) ToUint8

func (s Status) ToUint8() uint8

type Variables

type Variables struct {
	Key   string
	Value any
}

Directories

Path Synopsis
Package evtmocks is a generated GoMock package.
Package evtmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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