net

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TableDirection .
	TableDirection = "net_direction"
	//DirInput 从flow指向transition
	DirInput = int8(1)
	//DirOutput 从transition指向flow
	DirOutput = int8(2)

	//DirOrderSequence 下游顺序执行
	DirOrderSequence = int8(0)
	//DirOrderOrSplit 下游根据条件拆分,各分支若为transition,可允许操作个数>=1
	DirOrderOrSplit = int8(1)
	//DirOrderOrResultSplit 下游transition操作拆分,每个transition只有一个可允许操作,enable均默认为true,但只能操作一个
	//先不做, 如果做了,在详情页提交后,怎么知道提交的是哪个transition(有多个)呢?
	DirOrderOrResultSplit = int8(2)
)
View Source
const (
	//TableFlowResource .
	TableFlowResource = "net_flow_resource"

	//FRStateDeleted 流程取消状态
	FRStateDeleted = -1
	//FRStateRunning 流程运行状态
	FRStateRunning = 0
)
View Source
const (
	//StateAvailable .
	StateAvailable = "available"
	//StateDisable .
	StateDisable = "disable"
)
View Source
const (
	TableToken     = "net_token"
	TableTokenBind = "net_token_bind"
	//BindTypeFlow 绑定flow
	BindTypeFlow = int8(1)
	//BindTypeTransition 绑定单个审核操作
	BindTypeTransition = int8(2)
	//BindTypeTranBatch 绑定批量审核操作
	BindTypeTranBatch = int8(3)
	//BindTypeTranHelp 绑定单个非审核操作,提交后不流转
	BindTypeTranHelp = int8(4)
	//BindTypeTranHelpBatch 绑定批量非审核操作,提交后不流转
	BindTypeTranHelpBatch = int8(5)

	BindLogTemp = "%s(%d)=%s" //中文名=表达式

	BindBatchPrefix = "批量"
	BindBatchOptAll = int8(0)
	BindBatchOnly   = int8(1)
	BindBatchNot    = int8(2)
)

..

View Source
const (
	TokenCompareAssign       = int8(0)
	TokenCompareEqual        = int8(1)
	TokenCompareInequal      = int8(2)
	TokenCompareGreater      = int8(3)
	TokenCompareGreaterEqual = int8(4)
	TokenCompareLower        = int8(5)
	TokenCompareLowerEqual   = int8(6)
	TokenCompareBetween      = int8(7)
	TokenCompareNotBetween   = int8(8)
	TokenCompareIn           = int8(9)
	TokenCompareNotIn        = int8(10)
	TokenCompareExist        = int8(11)
	TokenCompareNotExist     = int8(12)

	//TokenTypeInt8值类型 .
	TokenTypeInt8   = int8(0)
	TokenTypeInt16  = int8(1)
	TokenTypeInt32  = int8(2)
	TokenTypeInt64  = int8(3)
	TokenTypeString = int8(4)
	TokenTypeBool   = int8(5)
)

TokenCompareAssign 运算符.

View Source
const (
	TableTransition = "net_transition"
	//TriggerManual 人工触发,一旦enable,执行由人审核提交
	TriggerManual = int8(1)
	//TriggerAuto 自动触发,一旦enable就可执行
	TriggerAuto = int8(2)
	//TriggerMsg 消息触发,一旦enable,执行为接收到指定消息
	TriggerMsg = int8(3)
)

..

View Source
const (
	// TableFlow .
	TableFlow = "net_flow"
)
View Source
const (
	// TableNet .
	TableNet = "net"
)

Variables

BindTranType 变迁绑定令牌类型

BindTypes .

View Source
var DirDirectionDesc = map[int8]string{
	DirInput:  "从节点指向变化",
	DirOutput: "从变化指向节点",
}

DirDirectionDesc .

View Source
var DirOrderDesc = map[int8]string{
	DirOrderSequence: "直序",
}

DirOrderDesc 有向线下游顺序描述

View Source
var Recovered = time.Time{}

Recovered .

View Source
var TokenCompareDesc = map[int8]string{
	TokenCompareAssign: "=",
}

TokenCompareDesc .

View Source
var TokenValueTypeDesc = map[int8]string{
	TokenTypeInt8:   "int8",
	TokenTypeInt16:  "int16",
	TokenTypeInt32:  "int32",
	TokenTypeInt64:  "int64",
	TokenTypeString: "string",
	TokenTypeBool:   "bool",
}

TokenValueTypeDesc ..

View Source
var TriggerDesc = map[int8]string{
	TriggerAuto:   "直序",
	TriggerManual: "人工",
	TriggerMsg:    "消息",
}

TriggerDesc 变迁触发类型描述

Functions

func GetTokenCompare

func GetTokenCompare(compare int8) string

GetTokenCompare .

func GetTokenValueType

func GetTokenValueType(tp int8) string

GetTokenValueType .

Types

type DirEditParam

type DirEditParam struct {
	ID           int64 `form:"id" validate:"omitempty,gt=0"`
	NetID        int64 `form:"net_id" validate:"omitempty,gt=0"`
	FlowID       int64 `form:"flow_id" validate:"required,gt=0"`
	TransitionID int64 `form:"transition_id" validate:"required,gt=0"`
	Direction    int8  `form:"direction" validate:"required,min=1,max=2"`
	Order        int8  `form:"order" validate:"min=0,max=0"`
	Output       string
	Guard        string
}

DirEditParam .

type Direction

type Direction struct {
	ID           int64     `gorm:"primary_key" json:"id" form:"id" validate:"omitempty,gt=0"`
	NetID        int64     `gorm:"column:net_id" json:"net_id" form:"net_id" validate:"omitempty,gt=0"`
	FlowID       int64     `gorm:"column:flow_id" json:"flow_id" form:"flow_id" validate:"required,gt=0"`
	TransitionID int64     `gorm:"column:transition_id" json:"transition_id" form:"transition_id" validate:"required,gt=0"`
	Direction    int8      `gorm:"column:direction" json:"direction" form:"direction" validate:"required,min=1,max=2"`
	Order        int8      `gorm:"column:order" json:"order" form:"order" validate:"omitempty,min=0,max=2"`
	Guard        string    `gorm:"column:guard" json:"guard"`
	Output       string    `gorm:"column:output" json:"output"`
	UID          int64     `gorm:"column:uid" json:"uid"`
	DisableTime  time.Time `gorm:"column:disable_time" json:"disable_time"`
	Ctime        time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime        time.Time `gorm:"column:mtime" json:"mtime"`
}

Direction 有向线,连接flow和transition

func (*Direction) IsAvailable

func (d *Direction) IsAvailable() bool

IsAvailable .

func (*Direction) TableName

func (d *Direction) TableName() string

TableName .

type Flow

type Flow struct {
	ID          int64     `gorm:"primary_key" json:"id"`
	NetID       int64     `gorm:"column:net_id" json:"net_id"`
	Name        string    `gorm:"column:name" json:"name"`
	ChName      string    `gorm:"column:ch_name" json:"ch_name"`
	Description string    `gorm:"column:description" json:"description"`
	UID         int64     `gorm:"column:uid" json:"uid"`
	DisableTime time.Time `gorm:"column:disable_time" json:"disable_time"`
	Ctime       time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime       time.Time `gorm:"column:mtime" json:"mtime"`
}

Flow 节点

func (*Flow) IsAvailable

func (f *Flow) IsAvailable() bool

IsAvailable .

func (*Flow) TableName

func (f *Flow) TableName() string

TableName .

type FlowArr

type FlowArr []*Flow

FlowArr .

func (FlowArr) Len

func (a FlowArr) Len() int

func (FlowArr) Less

func (a FlowArr) Less(i, j int) bool

func (FlowArr) Swap

func (a FlowArr) Swap(i, j int)

type FlowEditParam

type FlowEditParam struct {
	NetID       int64   `form:"net_id" validate:"omitempty,gt=0"`
	ID          int64   `form:"id" validate:"omitempty,gt=0"`
	Name        string  `form:"name" validate:"required,max=32"`
	ChName      string  `form:"ch_name" validate:"required,max=16"`
	Description string  `form:"description" validate:"max=60"`
	IsStart     bool    `form:"is_start" default:"false"`
	TokenIDList []int64 `form:"token_id_list,split" validate:"omitempty,dive,gt=0"`
}

FlowEditParam .

type FlowResource

type FlowResource struct {
	ID     int64 `gorm:"primary_key" json:"id"`
	RID    int64 `gorm:"column:rid" json:"rid"`
	FlowID int64 `gorm:"column:flow_id" json:"flow_id"`
	State  int8  `gorm:"column:state" json:"state"`
	NetID  int64 `gorm:"column:net_id" json:"net_id"`
}

FlowResource 资源在审核网的运行现状

func (*FlowResource) TableName

func (fr *FlowResource) TableName() string

TableName .

type GroupTokenParam

type GroupTokenParam struct {
	BusinessID int64  `json:"business_id" form:"business_id" validate:"omitempty,gt=0"`
	NetID      int64  `json:"net_id" form:"net_id" validate:"omitempty,gt=0"`
	GroupName  string `json:"group_name" form:"group_name" validate:"omitempty,max=10"`
}

GroupTokenParam .

type Int64Slice

type Int64Slice []int64

Int64Slice data.Less and data.Swap

func (Int64Slice) Len

func (sl Int64Slice) Len() int

func (Int64Slice) Less

func (sl Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap

func (sl Int64Slice) Swap(i, j int)

type JumpFlowResult

type JumpFlowResult struct {
	RID         int64         `json:"rid"`
	NetID       int64         `json:"net_id"`
	SubmitToken *TokenPackage `json:"submit_token"`
	ResultToken *TokenPackage `json:"result_token"`
	NewFlowID   int64         `json:"new_flow_id"`
	OldFlowID   string        `json:"old_flow_id"`
}

JumpFlowResult .

type JumpInfo

type JumpInfo struct {
	Flows      []*SimpleInfo    `json:"flows"`
	Operations []*TranOperation `json:"operations"`
}

JumpInfo .

type ListDirectionItem

type ListDirectionItem struct {
	ID             int64             `json:"id"`
	NetID          int64             `json:"net_id"`
	FlowID         int64             `json:"flow_id"`
	TransitionID   int64             `json:"transition_id"`
	Direction      int8              `json:"direction"`
	Order          int8              `json:"order"`
	Guard          string            `json:"guard"`
	Output         string            `json:"output"`
	UID            int64             `json:"uid" gorm:"column:uid"`
	DisableTime    xtime.Time        `json:"disable_time"`
	Ctime          common.FormatTime `json:"ctime"`
	Mtime          common.FormatTime `json:"mtime"`
	FlowName       string            `json:"flow_name"`
	TransitionName string            `json:"transition_name"`
	UserName       string            `json:"user_name"`
	NetName        string            `json:"net_name"`
}

ListDirectionItem .

type ListDirectionParam

type ListDirectionParam struct {
	NetID        int64   `json:"net_id" form:"net_id" validate:"required,gt=0"`
	FlowID       int64   `json:"flow_id" form:"flow_id" validate:"omitempty,gt=0"`
	TransitionID int64   `json:"transition_id" form:"transition_id" validate:"omitempty,gt=0"`
	Direction    int8    `json:"direction" form:"direction"`
	ID           []int64 `json:"id" form:"id,split" validate:"omitempty,dive,gt=0"`
	State        string  `json:"state" form:"state"`
	Sort         string  `json:"sort" form:"sort" default:"desc"`
	Pn           int64   `json:"pn" form:"pn" default:"1" validate:"gt=0"`
	Ps           int64   `json:"ps" form:"ps" default:"30" validate:"gt=0"`
}

ListDirectionParam .

type ListDirectionRes

type ListDirectionRes struct {
	Result []*ListDirectionItem `json:"result"`
	Pager  Pager                `json:"pager"`
}

ListDirectionRes .

type ListFlowItem

type ListFlowItem struct {
	ID          int64             `json:"id"`
	NetID       int64             `json:"net_id"`
	Name        string            `json:"name"`
	ChName      string            `json:"ch_name"`
	Description string            `json:"description"`
	UID         int64             `json:"uid" gorm:"column:uid"`
	DisableTime xtime.Time        `json:"disable_time"`
	Ctime       common.FormatTime `json:"ctime"`
	Mtime       common.FormatTime `json:"mtime"`
	Username    string            `json:"username"`
	Tokens      []string          `json:"tokens"`
	IsStart     bool              `json:"is_start"`
}

ListFlowItem .

type ListFlowRes

type ListFlowRes struct {
	Result []*ListFlowItem `json:"result"`
	Pager  Pager           `json:"pager"`
}

ListFlowRes .

type ListNetElementParam

type ListNetElementParam struct {
	NetID int64   `json:"net_id" form:"net_id" validate:"required,gt=0"`
	Name  string  `json:"name" form:"name" validate:"omitempty,max=10"`
	ID    []int64 `json:"id" form:"id,split" validate:"omitempty,dive,gt=0"`
	State string  `json:"state" form:"state"`
	Sort  string  `json:"sort" form:"sort" default:"desc"`
	Pn    int64   `json:"pn" form:"pn" default:"1" validate:"gt=0"`
	Ps    int64   `json:"ps" form:"ps" default:"30" validate:"gt=0"`
}

ListNetElementParam .

type ListNetItem

type ListNetItem struct {
	ID           int64             `json:"id"`
	BusinessID   int64             `json:"business_id"`
	ChName       string            `json:"ch_name"`
	Description  string            `json:"description"`
	StartFlowID  int64             `json:"start_flow_id"`
	PID          int64             `json:"pid" gorm:"column:pid"`
	UID          int64             `json:"uid" gorm:"column:uid"`
	DisableTime  xtime.Time        `json:"disable_time"`
	Ctime        common.FormatTime `json:"ctime"`
	Mtime        common.FormatTime `json:"mtime"`
	BusinessName string            `json:"business_name"`
	Username     string            `json:"username"`
}

ListNetItem .

type ListNetParam

type ListNetParam struct {
	BusinessID int64   `json:"business_id" form:"business_id" validte:"omitempty,gt=0"`
	ID         []int64 `json:"id" form:"id,split" validate:"omitempty,dive,gt=0"`
	State      string  `json:"state" form:"state"`
	Sort       string  `json:"sort" form:"sort" default:"desc"`
	Pn         int64   `json:"pn" form:"pn" default:"1" validate:"gt=0"`
	Ps         int64   `json:"ps" form:"ps" default:"30" validate:"gt=0"`
}

ListNetParam .

type ListNetRes

type ListNetRes struct {
	Result []*ListNetItem `json:"result"`
	Pager  Pager          `json:"pager"`
}

ListNetRes .

type ListTokenItem

type ListTokenItem struct {
	ID       int64             `json:"id"`
	NetID    int64             `json:"net_id"`
	ChName   string            `json:"ch_name"`
	Name     string            `json:"name"`
	Compare  int8              `json:"compare"`
	Value    string            `json:"value"`
	Type     int8              `json:"type"`
	UID      int64             `json:"uid" gorm:"column:uid"`
	Ctime    common.FormatTime `json:"ctime"`
	Mtime    common.FormatTime `json:"mtime"`
	Username string            `json:"username"`
}

ListTokenItem .

type ListTokenParam

type ListTokenParam struct {
	NetID  int64   `json:"net_id" form:"net_id" validate:"required,gt=0"`
	Name   string  `json:"name" form:"name" validate:"omitempty,max=10"`
	ID     []int64 `json:"id" form:"id,split" validate:"omitempty,dive,gt=0"`
	Sort   string  `json:"sort" form:"sort" default:"desc"`
	Pn     int64   `json:"pn" form:"pn" default:"1" validate:"gt=0"`
	Ps     int64   `json:"ps" form:"ps" default:"30" validate:"gt=0"`
	Assign bool    `json:"assign" form:"assign"`
}

ListTokenParam .

type ListTokenRes

type ListTokenRes struct {
	Result []*ListTokenItem `json:"result"`
	Pager  Pager            `json:"pager"`
}

ListTokenRes .

type ListTransitionItem

type ListTransitionItem struct {
	ID          int64             `json:"id"`
	NetID       int64             `json:"net_id"`
	Trigger     int8              `json:"trigger"`
	Limit       int64             `json:"limit"`
	Name        string            `json:"name"`
	ChName      string            `json:"ch_name"`
	Description string            `json:"description"`
	UID         int64             `json:"uid" gorm:"column:uid"`
	DisableTime xtime.Time        `json:"disable_time"`
	Ctime       common.FormatTime `json:"ctime"`
	Mtime       common.FormatTime `json:"mtime"`
	Username    string            `json:"username"`
	Tokens      []string          `json:"tokens"`
}

ListTransitionItem .

type ListTransitionRes

type ListTransitionRes struct {
	Result []*ListTransitionItem `json:"result"`
	Pager  Pager                 `json:"pager"`
}

ListTransitionRes .

type Net

type Net struct {
	ID          int64     `gorm:"primary_key" json:"id" form:"id" validate:"omitempty,gt=0"`
	BusinessID  int64     `gorm:"column:business_id" json:"business_id" form:"business_id" validate:"omitempty,gt=0"`
	ChName      string    `gorm:"column:ch_name" json:"ch_name" form:"ch_name" validate:"required,max=32"`
	Description string    `gorm:"column:description" json:"description" form:"description" validate:"max=60"`
	StartFlowID int64     `gorm:"column:start_flow_id" json:"start_flow_id" form:"start_flow_id"`
	PID         int64     `gorm:"column:pid" json:"pid"`
	UID         int64     `gorm:"column:uid" json:"uid"`
	DisableTime time.Time `gorm:"column:disable_time" json:"disable_time"`
	Ctime       time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime       time.Time `gorm:"column:mtime" json:"mtime"`
}

Net net.

func (*Net) IsAvailable

func (n *Net) IsAvailable() bool

IsAvailable .

func (*Net) TableName

func (n *Net) TableName() string

TableName table name

type NetEditParam

type NetEditParam struct {
	ID          int64  `form:"id" validate:"required,gt=0"`
	ChName      string `form:"ch_name" validate:"required,max=32"`
	Description string `form:"description" validate:"max=60"`
}

NetEditParam .

type Pager

type Pager struct {
	Num   int64 `json:"num"`
	Size  int64 `json:"size"`
	Total int64 `json:"total"`
}

Pager .

type ShowDirectionResult

type ShowDirectionResult struct {
	Direction      *Direction `json:"direction"`
	FlowName       string     `json:"flow_name"`
	TransitionName string     `json:"transition_name"`
}

ShowDirectionResult .

type ShowFlowResult

type ShowFlowResult struct {
	Flow    *Flow        `json:"flow"`
	Tokens  []*TokenBind `json:"tokens"`
	IsStart bool         `json:"is_start"`
}

ShowFlowResult .

type ShowTransitionResult

type ShowTransitionResult struct {
	Transition *Transition  `json:"transition"`
	Tokens     []*TokenBind `json:"tokens"`
}

ShowTransitionResult .

type SimpleInfo

type SimpleInfo struct {
	ID     int64  `json:"id"`
	ChName string `json:"ch_name"`
}

SimpleInfo .

type SwitchParam

type SwitchParam struct {
	ID      int64 `json:"id" form:"id" validate:"required,gt=0"`
	Disable bool  `json:"disable" form:"disable"`
}

SwitchParam .

type Token

type Token struct {
	ID      int64     `gorm:"primary_key" json:"id" form:"id" validate:"omitempty,gt=0"`
	NetID   int64     `gorm:"column:net_id" json:"net_id" form:"net_id" validate:"omitempty,gt=0"`
	ChName  string    `gorm:"column:ch_name" json:"ch_name" form:"ch_name" validate:"required,max=16"`
	Name    string    `gorm:"column:name" json:"name" form:"name" validate:"required,max=10"`
	Compare int8      `gorm:"column:compare" json:"compare" form:"compare" validate:"omitempty,min=0,max=10" default:"-1"`
	Value   string    `gorm:"column:value" json:"value" form:"value"`
	Type    int8      `gorm:"column:type" json:"type" form:"type" default:"-1"`
	UID     int64     `gorm:"column:uid" json:"uid"`
	Ctime   time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime   time.Time `gorm:"column:mtime" json:"mtime"`
}

Token .

func (*Token) FormatLog

func (tk *Token) FormatLog() string

FormatLog 日志形式

func (*Token) FormatValue

func (tk *Token) FormatValue() (vt interface{}, err error)

FormatValue .

func (*Token) IsAssign

func (tk *Token) IsAssign() bool

IsAssign .

func (*Token) TableName

func (tk *Token) TableName() string

TableName .

type TokenBind

type TokenBind struct {
	ID          int64     `gorm:"primary_key" json:"id"`
	Type        int8      `gorm:"column:type" json:"type"`
	ElementID   int64     `gorm:"column:element_id" json:"element_id"`
	TokenID     string    `gorm:"column:token_id" json:"token_id"`
	ChName      string    `gorm:"column:ch_name" json:"ch_name" `
	UID         int64     `gorm:"column:uid" json:"uid"`
	DisableTime time.Time `gorm:"column:disable_time" json:"disable_time"`
	Ctime       time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime       time.Time `gorm:"column:mtime" json:"mtime"`
}

TokenBind .

func (*TokenBind) IsAvailable

func (tb *TokenBind) IsAvailable() bool

IsAvailable .

func (*TokenBind) IsBatch

func (tb *TokenBind) IsBatch() bool

IsBatch .

func (*TokenBind) TableName

func (tb *TokenBind) TableName() string

TableName .

type TokenBindDetail

type TokenBindDetail struct {
	ID          int64     `json:"id"`
	Type        int8      `json:"type"`
	ElementID   int64     `json:"element_id"`
	TokenID     string    `json:"token_id"`
	ChName      string    `json:"ch_name"`
	DisableTime time.Time `json:"disable_time"`
	Tokens      []*Token  `json:"tokens"`
}

TokenBindDetail .

func (*TokenBindDetail) FormatLog

func (tb *TokenBindDetail) FormatLog() string

FormatLog 日志形式

func (*TokenBindDetail) IsAvailable

func (tb *TokenBindDetail) IsAvailable() bool

IsAvailable .

type TokenBindParam

type TokenBindParam struct {
	ID      int64  `json:"id,omitemtpy"`
	ChName  string `json:"ch_name,omitempty"`
	TokenID string `json:"token_id"`
	Type    int8   `json:"type"`
}

TokenBindParam .

type TokenPackage

type TokenPackage struct {
	Values      map[string]interface{} `json:"values"`
	TokenIDList []int64                `json:"token_id_list"`
	ChName      string                 `json:"ch_name"`
	HitAudit    bool                   `json:"hit_audit"`
}

TokenPackage .

type TranOperation

type TranOperation struct {
	BindIDList string `json:"bind_id_list"`
	ChName     string `json:"ch_name"`
}

TranOperation .

type TranOperationArr

type TranOperationArr []*TranOperation

TranOperationArr .

func (TranOperationArr) Len

func (a TranOperationArr) Len() int

func (TranOperationArr) Less

func (a TranOperationArr) Less(i, j int) bool

func (TranOperationArr) Swap

func (a TranOperationArr) Swap(i, j int)

type Transition

type Transition struct {
	ID          int64     `gorm:"primary_key" json:"id" form:"id" validate:"omitempty,gt=0"`
	NetID       int64     `gorm:"column:net_id" json:"net_id" form:"net_id" validate:"omitempty,gt=0"`
	Trigger     int8      `gorm:"column:trigger" json:"trigger" default:"1" form:"trigger"`
	Limit       int64     `gorm:"column:limit" json:"limit" form:"limit"`
	Name        string    `gorm:"column:name" json:"name" form:"name" validate:"required,max=32"`
	ChName      string    `gorm:"column:ch_name" json:"ch_name" form:"ch_name" validate:"required,max=16"`
	Description string    `gorm:"column:description" json:"description" form:"description" validate:"max=60"`
	UID         int64     `gorm:"column:uid" json:"uid"`
	DisableTime time.Time `gorm:"column:disable_time" json:"disable_time"`
	Ctime       time.Time `gorm:"column:ctime" json:"ctime"`
	Mtime       time.Time `gorm:"column:mtime" json:"mtime"`
}

Transition 变迁

func (*Transition) IsAvailable

func (t *Transition) IsAvailable() bool

IsAvailable .

func (*Transition) TableName

func (t *Transition) TableName() string

TableName .

type TransitionEditParam

type TransitionEditParam struct {
	NetID       int64             `json:"net_id" validate:"omitempty,gt=0"`
	ID          int64             `json:"id" validate:"omitempty,gt=0"`
	Trigger     int8              `json:"trigger" validate:"omitempty,min=1,max=1"`
	Limit       int64             `json:"limit"`
	Name        string            `json:"name" validate:"required,max=32"`
	ChName      string            `json:"ch_name" validate:"required,max=16"`
	Description string            `json:"description" validate:"max=60"`
	TokenList   []*TokenBindParam `json:"token_list" validate:"required,gt=0" `
}

TransitionEditParam .

type TransitionInfo

type TransitionInfo struct {
	RID        int64            `json:"rid"`
	FlowID     int64            `json:"flow_id"`
	Operations []*TranOperation `json:"operations"`
}

TransitionInfo .

type TriggerResult

type TriggerResult struct {
	RID          int64         `json:"rid"`
	NetID        int64         `json:"net_id"`
	SubmitToken  *TokenPackage `json:"submit_token"`
	ResultToken  *TokenPackage `json:"result_token"`
	NewFlowID    int64         `json:"new_flow_id"`
	OldFlowID    string        `json:"old_flow_id"` //可能有多个旧节点
	TransitionID []int64       `json:"transition_id"`
	From         string        `json:"from"`
}

TriggerResult .

Jump to

Keyboard shortcuts

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