Documentation ¶
Index ¶
- Constants
- func DecodeJSON(in []byte, out interface{}) error
- func DecodeSnappy(in []byte, out interface{}) error
- func EncodeJSON(in interface{}) ([]byte, error)
- func EncodeSnappy(in interface{}) (out []byte, err error)
- type AuditResultStatus
- type ContainerResources
- type EntityDeltaKind
- type GroupVersionResourceKind
- type Match
- type PacketAuditResultItem
- type PacketAuditResultRequest
- type PacketAuthorizationAnswer
- type PacketAuthorizationFailure
- type PacketAuthorizationQuestion
- type PacketAuthorizationRequest
- type PacketAuthorizationSuccess
- type PacketBye
- type PacketConstraintItem
- type PacketConstraintsRequest
- type PacketConstraintsResponse
- type PacketEntitiesDeltasRequest
- type PacketEntitiesDeltasResponse
- type PacketEntitiesResyncItem
- type PacketEntitiesResyncRequest
- type PacketEntitiesResyncResponse
- type PacketEntityDelta
- type PacketHello
- type PacketKind
- type PacketLogItem
- type PacketLogLevel
- type PacketLogs
- type PacketPing
- type PacketPong
- type PacketRestart
- type ParentController
- type ReplicasStatus
- type RequestLimit
Constants ¶
View Source
const ( ResourceRequirementKindSet = "set" ResourceRequirementKindDefaultsLimitRange = "defaults-limit-range" ResourceRequirementKindDefaultFromLimits = "default-from-limits" )
View Source
const ( AuditResultStatusViolating = "Violation" AuditResultStatusCompliant = "Compliance" AuditResultStatusIgnored = "Ignored" )
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
func DecodeSnappy ¶
func EncodeJSON ¶
func EncodeSnappy ¶
Types ¶
type AuditResultStatus ¶ added in v3.4.0
type AuditResultStatus string
type ContainerResources ¶
type ContainerResources struct { Requests *RequestLimit `json:"requests,omitempty"` Limits *RequestLimit `json:"limits,omitempty"` }
type EntityDeltaKind ¶
type EntityDeltaKind string
const ( EntityEventTypeUpsert EntityDeltaKind = "UPSERT" EntityEventTypeDelete EntityDeltaKind = "DELETE" )
type GroupVersionResourceKind ¶
type GroupVersionResourceKind struct { schema.GroupVersionResource Kind string `json:"kind"` }
type PacketAuditResultItem ¶ added in v3.3.1
type PacketAuditResultItem struct { TemplateID *string `json:"template_id"` ConstraintID *string `json:"constraint_id"` CategoryID *string `json:"category_id"` Severity *string `json:"severity"` Controls []string `json:"controls"` Standards []string `json:"standards"` Description string `json:"description"` HowToSolve string `json:"how_to_solve"` Status AuditResultStatus `json:"status"` Msg *string `json:"msg"` EntityName *string `json:"entity_name"` EntityKind *string `json:"entity_kind"` NamespaceName *string `json:"namespace_name,omitempty"` ParentName *string `json:"parent_name,omitempty"` ParentKind *string `json:"parent_kind,omitempty"` EntitySpec map[string]interface{} `json:"entity_spec"` Trigger string `json:"trigger"` }
type PacketAuditResultRequest ¶ added in v3.3.1
type PacketAuditResultRequest struct { Items []*PacketAuditResultItem `json:"items"` Timestamp time.Time `json:"timestamp"` }
type PacketAuthorizationAnswer ¶
type PacketAuthorizationAnswer struct {
Token []byte `json:"token"`
}
type PacketAuthorizationFailure ¶
type PacketAuthorizationFailure struct{}
type PacketAuthorizationQuestion ¶
type PacketAuthorizationQuestion struct {
Token []byte `json:"token"`
}
type PacketAuthorizationRequest ¶
type PacketAuthorizationRequest struct { AccountID uuid.UUID `json:"account_id"` ClusterID uuid.UUID `json:"cluster_id"` }
type PacketAuthorizationSuccess ¶
type PacketAuthorizationSuccess struct{}
type PacketConstraintItem ¶ added in v3.3.1
type PacketConstraintItem struct { Id string `json:"id"` TemplateId string `json:"template_id"` AccountId string `json:"account_id"` ClusterId string `json:"cluster_id"` Name string `json:"name"` TemplateName string `json:"template_name"` Parameters map[string]interface{} `json:"parameters"` Match Match `json:"match"` Code string `json:"code"` Description string `json:"description"` HowToSolve string `json:"how_to_solve"` CategoryId string `json:"category_id"` Severity string `json:"severity"` Controls []string `json:"controls"` Standards []string `json:"standards"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *string `json:"deleted_at,omitempty"` }
type PacketConstraintsRequest ¶ added in v3.3.1
type PacketConstraintsRequest struct { Timestamp time.Time `json:"timestamp"` Constraints []PacketConstraintItem `json:"constraints"` }
type PacketConstraintsResponse ¶ added in v3.3.1
type PacketConstraintsResponse struct{}
type PacketEntitiesDeltasRequest ¶
type PacketEntitiesDeltasRequest struct { Items []PacketEntityDelta `json:"items"` Timestamp time.Time `json:"timestamp"` }
type PacketEntitiesDeltasResponse ¶
type PacketEntitiesDeltasResponse struct{}
type PacketEntitiesResyncItem ¶
type PacketEntitiesResyncItem struct { Gvrk GroupVersionResourceKind `json:"gvrk"` Data []*unstructured.Unstructured `json:"data"` }
type PacketEntitiesResyncRequest ¶
type PacketEntitiesResyncRequest struct { Timestamp time.Time `json:"timestamp"` // map of entities kind and entities definitions // it holds other entities not already specified in attributes above Snapshot map[string]PacketEntitiesResyncItem `json:"snapshot"` }
type PacketEntitiesResyncResponse ¶
type PacketEntitiesResyncResponse struct{}
type PacketEntityDelta ¶
type PacketEntityDelta struct { Gvrk GroupVersionResourceKind `json:"gvrk"` DeltaKind EntityDeltaKind `json:"delta_kind"` Data unstructured.Unstructured `json:"data"` Parent *ParentController `json:"parents"` Timestamp time.Time `json:"timestamp"` }
type PacketHello ¶
type PacketHello struct { Major uint `json:"major"` Minor uint `json:"minor"` Build string `json:"build"` StartID string `json:"start_id"` AccountID uuid.UUID `json:"account_id"` ClusterID uuid.UUID `json:"cluster_id"` PacketV2Enabled bool `json:"packet_v2_enabled,omitempty"` ServerVersion string `json:"server_version"` AgentPermissions string `json:"agent_permissions"` }
type PacketKind ¶
type PacketKind string
const ( PacketKindHello PacketKind = "hello" PacketKindAuthorizationRequest PacketKind = "authorization/request" PacketKindAuthorizationAnswer PacketKind = "authorization/answer" PacketKindLogs PacketKind = "logs" PacketKindEntitiesDeltasRequest PacketKind = "entities/deltas" PacketKindEntitiesResyncRequest PacketKind = "entities/resync" PacketKindBye PacketKind = "bye" PacketKindRestart PacketKind = "restart" PacketKindRawStoreRequest PacketKind = "raw/store" PacketKindLogLevel PacketKind = "loglevel" PacketKindConstraintsRequest PacketKind = "audit/constraints" PacketKindAuditResultRequest PacketKind = "audit/result" PacketKindAuditCommand PacketKind = "audit/audit_command" )
const (
PacketKindPing PacketKind = "ping"
)
func (PacketKind) String ¶
func (kind PacketKind) String() string
type PacketLogItem ¶
type PacketLogLevel ¶
type PacketLogLevel struct {
Level string `json:"level"`
}
PacketLogLevel used to change current log level
type PacketLogs ¶
type PacketLogs []PacketLogItem
type PacketPing ¶
type PacketPong ¶
type PacketRestart ¶
type PacketRestart struct {
Status int `json:"status"`
}
type ParentController ¶
type ParentController struct { Kind string `json:"kind"` Name string `json:"name"` APIVersion string `json:"api_version"` IsWatched bool `json:"is_watched"` Parent *ParentController `json:"parent"` }
type ReplicasStatus ¶
type RequestLimit ¶
Click to show internal directories.
Click to hide internal directories.