AFAIRE
sdk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

/*
------------------------------------------------------------------------------------------------------------------------
####### sdk ####### Copyright (c) 2021 losyme ###################################################### MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package factory
import "forge.chapril.org/dune/jw"
type Workflow struct {
wf *jw.Workflow
model Model
}
func (wf *Workflow) SetID(value string) *Workflow {
wf.wf.SetID(value)
return wf
}
func (wf *Workflow) SetType(value string) *Workflow {
wf.wf.SetType(value)
return wf
}
func (wf *Workflow) SetDescription(value string) *Workflow {
wf.wf.SetDescription(value)
return wf
}
func (wf *Workflow) SetOrigin(value string) *Workflow {
wf.wf.SetOrigin(value)
return wf
}
func (wf *Workflow) SetPriority(value jw.Priority) *Workflow {
wf.wf.SetPriority(value)
return wf
}
func (wf *Workflow) SetPriorityNone() *Workflow {
wf.wf.SetPriorityNone()
return wf
}
func (wf *Workflow) SetPriorityLow() *Workflow {
wf.wf.SetPriorityLow()
return wf
}
func (wf *Workflow) SetPriorityMedium() *Workflow {
wf.wf.SetPriorityMedium()
return wf
}
func (wf *Workflow) SetPriorityHigh() *Workflow {
wf.wf.SetPriorityHigh()
return wf
}
func (wf *Workflow) SetPriorityCritical() *Workflow {
wf.wf.SetPriorityCritical()
return wf
}
func (wf *Workflow) SetData(key string, value interface{}) *Workflow {
wf.wf.SetData(key, value)
return wf
}
func (wf *Workflow) SetExternalID(value string) *Workflow {
wf.wf.SetExternalID(value)
return wf
}
func (wf *Workflow) CreateWorkflow() (*jw.Workflow, error) {
return wf.model.CreateWorkflow(wf.wf)
}
/*
######################################################################################################## @(°_°)@ #######
*/