-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ifx: move running context to tcl package
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
- Loading branch information
Showing
6 changed files
with
79 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2024 Testkube. | ||
// | ||
// Licensed as a Testkube Pro file under the Testkube Community | ||
// License (the "License"); you may not use this file except in compliance with | ||
// the License. You may obtain a copy of the License at | ||
// | ||
// https://github.com/kubeshop/testkube/blob/main/licenses/TCL.txt | ||
package api | ||
|
||
import ( | ||
"github.com/kubeshop/testkube/internal/common" | ||
"github.com/kubeshop/testkube/pkg/api/v1/testkube" | ||
) | ||
|
||
func GetRunningContext(name, username, email string) *testkube.TestWorkflowRunningContext { | ||
return &testkube.TestWorkflowRunningContext{ | ||
Interface_: &testkube.TestWorkflowRunningContextInterface{ | ||
Type_: common.Ptr(testkube.API_TestWorkflowRunningContextInterfaceType), | ||
}, | ||
Actor: &testkube.TestWorkflowRunningContextActor{ | ||
Name: name, | ||
Username: username, | ||
Email: email, | ||
Type_: common.Ptr(testkube.PROGRAM_TestWorkflowRunningContextActorType), | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2024 Testkube. | ||
// | ||
// Licensed as a Testkube Pro file under the Testkube Community | ||
// License (the "License"); you may not use this file except in compliance with | ||
// the License. You may obtain a copy of the License at | ||
// | ||
// https://github.com/kubeshop/testkube/blob/main/licenses/TCL.txt | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/kubeshop/testkube/internal/common" | ||
"github.com/kubeshop/testkube/pkg/api/v1/testkube" | ||
) | ||
|
||
func GetRunningContext(runContext, username, email string, interfaceType testkube.TestWorkflowRunningContextInterfaceType) *testkube.TestWorkflowRunningContext { | ||
return &testkube.TestWorkflowRunningContext{ | ||
Interface_: &testkube.TestWorkflowRunningContextInterface{ | ||
Name: runContext, | ||
Type_: common.Ptr(interfaceType), | ||
}, | ||
Actor: &testkube.TestWorkflowRunningContextActor{ | ||
Type_: common.Ptr(testkube.USER_TestWorkflowRunningContextActorType), | ||
Username: username, | ||
Email: email, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters