Documentation ¶
Index ¶
- Constants
- type BaseController
- type FlowController
- func (c *FlowController) Action()
- func (c *FlowController) Configs()
- func (c *FlowController) Delete()
- func (c *FlowController) DeleteList()
- func (c *FlowController) Export()
- func (c *FlowController) GetAll()
- func (c *FlowController) GetHistory()
- func (c *FlowController) GetOne()
- func (c *FlowController) GetOpLogHistory()
- func (c *FlowController) GetPreHandlers()
- func (c *FlowController) Import()
- func (c *FlowController) Next()
- func (c *FlowController) Post()
- func (c *FlowController) Put()
- func (c *FlowController) URLMapping()
Constants ¶
const ( ServiceActionGetAll = "GetAll" ServiceActionGetOne = "GetOne" ServiceActionCreate = "Create" ServiceActionPut = "Update" ServiceActionDelete = "Delete" ServiceActionDeleteList = "DeleteList" ServiceActionGetConfigs = "GetConfigs" ServiceOpList = "OperationList" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct { common.BaseController Service flowservice.FlowService // ServiceName string // // contains filtered or unexported fields }
继承公共基础
func (*BaseController) LogFunc ¶
func (c *BaseController) LogFunc(serviceId uint, action, log string)
记录操作日志
func (*BaseController) ResponseJSON ¶
func (c *BaseController) ResponseJSON(err error, ret interface{}, serviceId uint, action, oplog string)
ResponseJSON(重写方法) 返回JSON格式结果
type FlowController ¶
type FlowController struct {
BaseController
}
FlowController operations for model
func (*FlowController) Action ¶
func (c *FlowController) Action()
Action ... @Title 独立动作 @Description handle a action @Param body body params true "body for Service content" @Success 201 {int} OK(step info) @Failure 403 body is empty @router /:service/:id/:action [post]
func (*FlowController) Configs ¶
func (c *FlowController) Configs()
Configs ... @Title Get 获取参数对象结构 @Description get configs for next @Param id path string true "The key for staticblock" @Success 200 {object} Service @Failure 403 :id is empty @router /:service/:id/config [get]
func (*FlowController) Delete ¶
func (c *FlowController) Delete()
Delete ... @Title Delete @Description delete the Service @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:service/:id [delete]
func (*FlowController) DeleteList ¶
func (c *FlowController) DeleteList()
DeleteList ... @Title multi-Delete @Description delete multi Services @Param ids string true "The ids you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:service/deletelist [delete]
func (*FlowController) Export ¶
func (c *FlowController) Export()
Export ... @Title export @Description get Service @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} Service @Failure 403 @router /:service/export [get]
func (*FlowController) GetAll ¶
func (c *FlowController) GetAll()
GetAll ... @Title Get All @Description get Service @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} Service @Failure 403 @router /:service [get]
func (*FlowController) GetHistory ¶
func (c *FlowController) GetHistory()
GetHistory ... @Title Get 获取流程的操作记录(历史) @Description get get operation list history @Param id path string true "The key for staticblock" @Success 200 {object} Service @Failure 403 :id is empty @router /:service/:id/oplist [get]
func (*FlowController) GetOne ¶
func (c *FlowController) GetOne()
GetOne ... @Title Get One @Description get Service by id @Param id path string true "The key for staticblock" @Success 200 {object} Service @Failure 403 :id is empty @router /:service/:id [get]
func (*FlowController) GetOpLogHistory ¶
func (c *FlowController) GetOpLogHistory()
GetOpLogHistory ... @Title Get 获取流程等操作日志记录 @Description get get operation list history @Param id path string true "The key for staticblock" @Success 200 {object} Service @Failure 403 :id is empty @router /:service/:id/oploglist [get]
func (*FlowController) GetPreHandlers ¶
func (c *FlowController) GetPreHandlers()
GetPreHandlers ... @Title Get 获取上一步处理人(退回流程使用) @Description get get operation list history @Param id path string true "The key for staticblock" @Success 200 {object} Service @Failure 403 :id is empty @router /:service/:id/prehandlers [get]
func (*FlowController) Import ¶
func (c *FlowController) Import()
Import ... @Title 导出excel,批量创建对象 @Description batch create Service @Param service string Service true "body for Service content" @Success 201 {int} Service @Failure 403 body is empty @router /:service/import [post]
func (*FlowController) Next ¶
func (c *FlowController) Next()
Next ... @Title 进入流程下一步 @Description handle Service to next step @Param body body params true "body for Service content" @Success 201 {int} OK(step info) @Failure 403 body is empty @router /:service/:id/:handlerId [post]
func (*FlowController) Post ¶
func (c *FlowController) Post()
Post ... @Title 创建一条流程 @Description create Service @Param service string Service true "body for Service content" @Success 201 {int} Service @Failure 403 body is empty @router /:service [post]
func (*FlowController) Put ¶
func (c *FlowController) Put()
Put ... @Title Put @Description update the Service @Param id path string true "The id you want to update" @Param body body Service true "body for Service content" @Success 200 {object} Service @Failure 403 :id is not int @router /:service/:id [put]