-
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
Showing
14 changed files
with
96 additions
and
103 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,28 @@ | ||
package castai | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
type EventType string | ||
|
||
const ( | ||
EventAdd EventType = "add" | ||
EventUpdate EventType = "update" | ||
EventDelete EventType = "delete" | ||
) | ||
|
||
type Delta struct { | ||
FullSnapshot bool `json:"full_snapshot,omitempty"` | ||
Items []DeltaItem `json:"items"` | ||
} | ||
|
||
type DeltaItem struct { | ||
Event EventType `json:"event"` | ||
ObjectUID string `json:"object_uid"` | ||
ObjectName string `json:"object_name,omitempty"` | ||
ObjectNamespace string `json:"object_namespace,omitempty"` | ||
ObjectKind string `json:"object_kind,omitempty"` | ||
ObjectAPIVersion string `json:"object_api_version,omitempty"` | ||
ObjectCreatedAt time.Time `json:"object_created_at,omitempty"` | ||
} |
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,37 @@ | ||
package castai | ||
|
||
import "github.com/google/uuid" | ||
|
||
type State string | ||
|
||
type Node struct { | ||
NodeName string `json:"node_name"` | ||
ResourceID uuid.UUID `json:"resource_id"` | ||
} | ||
|
||
type CustomReport struct { | ||
OverallControls | ||
Node | ||
} | ||
|
||
type OverallControls struct { | ||
Controls []*Controls `json:"Controls"` | ||
} | ||
|
||
type Controls struct { | ||
Groups []*Group `json:"tests"` | ||
} | ||
|
||
// Group is a collection of similar checks. | ||
type Group struct { | ||
Checks []*Check `json:"results"` | ||
} | ||
|
||
// Check contains information about a recommendation in the | ||
// CIS Kubernetes document. | ||
type Check struct { | ||
ID string `yaml:"id" json:"test_number"` | ||
Text string `json:"test_desc"` | ||
TestInfo []string `json:"test_info"` | ||
State `json:"status"` | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package types | ||
package castai | ||
|
||
import "fmt" | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package types | ||
package castai | ||
|
||
import ( | ||
"testing" | ||
|
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,14 @@ | ||
package castai | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
type LogEvent struct { | ||
Level string `json:"level"` | ||
Time time.Time `json:"time"` | ||
Message string `json:"message"` | ||
Fields logrus.Fields `json:"fields"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
File renamed without changes.