Browse Source

Add slug field to pipeline struct

feature/add-pipeline-endpoints
Fabian Vowie 3 years ago
parent
commit
f6bb5498e8
No known key found for this signature in database GPG Key ID: C27317C33B27C410
  1. 1
      pipeline.go
  2. 3
      pipeline_test.go
  3. 3
      pipelines/example.json

1
pipeline.go

@ -27,6 +27,7 @@ type IPipeline interface {
type Pipeline struct { type Pipeline struct {
Name string `json:"name"` Name string `json:"name"`
Slug string `json:"slug"`
Type PipelineType `json:"type"` Type PipelineType `json:"type"`
RemoveMetadata bool `json:"remove_metadata"` RemoveMetadata bool `json:"remove_metadata"`
Steps []Step `json:"steps"` Steps []Step `json:"steps"`

3
pipeline_test.go

@ -1,8 +1,9 @@
package main package main
import ( import (
"github.com/stretchr/testify/assert"
"testing" "testing"
"github.com/stretchr/testify/assert"
) )
func TestImagePipelineDeserialization(t *testing.T) { func TestImagePipelineDeserialization(t *testing.T) {

3
pipelines/example.json

@ -1,5 +1,7 @@
[
{ {
"name": "example pipeline", "name": "example pipeline",
"slug": "example",
"type": 0, "type": 0,
"removeMetadata": false, "removeMetadata": false,
"steps": [ "steps": [
@ -13,3 +15,4 @@
} }
] ]
} }
]
Loading…
Cancel
Save