internal/relui: create workflows from parameters

This change updates the UI and creation endpoint to use the
parameters specified for the workflow.

For golang/go#47401

Change-Id: I46623a17161806c39cad98853e996f0fee5a0305
Reviewed-on: https://go-review.googlesource.com/c/build/+/352169
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/internal/workflow/workflow.go b/internal/workflow/workflow.go
index 016b14e..11727ed 100644
--- a/internal/workflow/workflow.go
+++ b/internal/workflow/workflow.go
@@ -67,6 +67,16 @@
 	return &workflowParameter{name: name}
 }
 
+// ParameterNames returns the names of all parameters associated with
+// the Definition.
+func (d *Definition) ParameterNames() []string {
+	var names []string
+	for n := range d.parameterNames {
+		names = append(names, n)
+	}
+	return names
+}
+
 type workflowParameter struct {
 	name string
 }