-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75f3003
commit f73e235
Showing
5 changed files
with
69 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add a resource | ||
|
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,43 @@ | ||
package resource | ||
|
||
import "github.com/SimonBaeumer/goss/system" | ||
|
||
type Kubernetes struct { | ||
Title string `json:"title,omitempty" yaml:"title,omitempty"` | ||
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` | ||
Name string `json:"-" yaml:"-"` | ||
ResourceType string `json:"resource-type" yaml:"resource-type"` | ||
} | ||
|
||
func (k *Kubernetes) ID() string { | ||
return k.Name | ||
} | ||
|
||
func (k *Kubernetes) SetID(id string) { | ||
k.Name = id | ||
} | ||
|
||
func (k *Kubernetes) GetTitle() string { | ||
return k.Title | ||
} | ||
|
||
func (k *Kubernetes) GetMeta() meta { | ||
return k.Meta | ||
} | ||
|
||
func (k *Kubernetes) Validate(sys *system.System) []TestResult { | ||
var results []TestResult | ||
|
||
result := TestResult{ | ||
Successful: true, | ||
Result: SUCCESS, | ||
} | ||
|
||
results = append(results, result) | ||
return results | ||
} | ||
|
||
// TODO: add feature | ||
func NewKubernetes() { | ||
|
||
} |
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,22 @@ | ||
package system | ||
|
||
type Kubernetes interface { | ||
Status() string | ||
ResourceType() string | ||
} | ||
|
||
type DefKubernetes struct { | ||
pod string | ||
} | ||
|
||
func (k *DefKubernetes) setup() error { | ||
return nil | ||
} | ||
|
||
func Status() string { | ||
return "pending" | ||
} | ||
|
||
func ResourceType() string { | ||
return "pod" | ||
} |
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