Skip to content

Commit

Permalink
feat: added content errors
Browse files Browse the repository at this point in the history
  • Loading branch information
exu committed Feb 3, 2022
1 parent d5287bc commit 1479570
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/api/v1/testkube/model_script_content_extended.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// content could be fetched as file or dir (many files, e.g. Cypress project) in executor
package testkube

import "fmt"

type ScriptContentType string

const (
Expand All @@ -10,6 +12,9 @@ const (
ScriptContentTypeGitDir ScriptContentType = "git-dir"
)

var ErrTypeNotFile = fmt.Errorf("unsupported content type use one of: file-uri, git-file, string")
var ErrTypeNotDir = fmt.Errorf("unsupported content type use one of: git-dir")

func NewStringScriptContent(str string) *ScriptContent {
return &ScriptContent{
Type_: string(ScriptContentTypeGitFile),
Expand Down

0 comments on commit 1479570

Please sign in to comment.