mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-08 23:20:07 +08:00
Adding apiCronWorkflow function, to return the expected API response
struct.
This commit is contained in:
@@ -13,4 +13,17 @@ func NewCronWorkflowServer() *CronWorkflowServer {
|
||||
|
||||
func (c CronWorkflowServer) CreateCronWorkflow(ctx context.Context, req *api.CreateWorkflowRequest) (*api.CronWorkflow, error) {
|
||||
panic("implement me")
|
||||
func apiCronWorkflow(cwf *v1.CronWorkflow) (cronWorkflow *api.CronWorkflow) {
|
||||
cronWorkflow = &api.CronWorkflow{
|
||||
Schedule: cwf.Schedule,
|
||||
Timezone: cwf.Timezone,
|
||||
Suspend: cwf.Suspend,
|
||||
ConcurrencyPolicy: cwf.ConcurrencyPolicy,
|
||||
StartingDeadlineSeconds: cwf.StartingDeadlineSeconds,
|
||||
SuccessfulJobsHistoryLimit: cwf.SuccessfulJobsHistoryLimit,
|
||||
FailedJobsHistoryLimit: cwf.FailedJobsHistoryLimit,
|
||||
WorkflowExecution: GenApiWorkflowExecution(cwf.WorkflowExecution),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user