Adding apiCronWorkflow function, to return the expected API response

struct.
This commit is contained in:
Aleksandr Melnikov
2020-03-25 11:08:19 -07:00
parent 1ffdcf4a3d
commit 8719a1ee2a

View File

@@ -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
}
}