-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use create debug project instead of create job from job api (#202)
- Loading branch information
1 parent
d958e74
commit ea188d1
Showing
4 changed files
with
51 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package models | ||
|
||
import "encoding/json" | ||
|
||
type DebugProjectV1Alpha struct { | ||
ProjectIdOrName string `json:"project_id_or_name,omitempty" yaml:"project_id_or_name"` | ||
Duration int `json:"duration,omitempty,string" yaml:"duration,omitempty"` | ||
MachineType string `json:"machine_type,omitempty" yaml:"machine_type,omitempty"` | ||
} | ||
|
||
func NewDebugProjectV1Alpha(project string, duration int, machine string) *DebugProjectV1Alpha { | ||
j := DebugProjectV1Alpha{} | ||
|
||
j.ProjectIdOrName = project | ||
j.Duration = duration | ||
j.MachineType = machine | ||
|
||
return &j | ||
} | ||
|
||
func (j *DebugProjectV1Alpha) ToJson() ([]byte, error) { | ||
return json.Marshal(j) | ||
} |
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