Added logic to get a secret and worked on adding createdAt timestamps to models.

This commit is contained in:
Andrey Melnikov
2020-01-27 10:05:23 -08:00
parent 3eb9231cde
commit 6fa397cdbd
16 changed files with 444 additions and 131 deletions

View File

@@ -21,9 +21,10 @@ func NewWorkflowServer(resourceManager *manager.ResourceManager) *WorkflowServer
func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) {
workflow = &api.Workflow{
Name: wf.Name,
Uid: wf.UID,
Status: wf.Status,
CreatedAt: wf.CreatedAt.UTC().Format(time.RFC3339),
Name: wf.Name,
Uid: wf.UID,
Status: wf.Status,
}
if wf.WorkflowTemplate != nil {
@@ -41,11 +42,12 @@ func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) {
func apiWorkflowTemplate(wft *model.WorkflowTemplate) *api.WorkflowTemplate {
return &api.WorkflowTemplate{
Uid: wft.UID,
Name: wft.Name,
Version: wft.Version,
Manifest: wft.Manifest,
IsLatest: wft.IsLatest,
Uid: wft.UID,
CreatedAt: wft.CreatedAt.UTC().Format(time.RFC3339),
Name: wft.Name,
Version: wft.Version,
Manifest: wft.Manifest,
IsLatest: wft.IsLatest,
}
}