proto

package
v3.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

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 DecodeJSON(in []byte, out interface{}) error

func DecodeSnappy

func DecodeSnappy(in []byte, out interface{}) error

func EncodeJSON

func EncodeJSON(in interface{}) ([]byte, error)

func EncodeSnappy

func EncodeSnappy(in interface{}) (out []byte, err error)

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 Match added in v3.3.1

type Match struct {
	Namespaces []string            `json:"namespaces"`
	Kinds      []string            `json:"kinds"`
	Labels     []map[string]string `json:"labels"`
}

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 PacketBye

type PacketBye struct {
	Reason string `json:"reason,omitempty"`
}

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 PacketLogItem struct {
	Date time.Time `json:"date"`
	Data string    `json:"data"`
}

type PacketLogLevel

type PacketLogLevel struct {
	Level string `json:"level"`
}

PacketLogLevel used to change current log level

type PacketLogs

type PacketLogs []PacketLogItem

type PacketPing

type PacketPing struct {
	Number  int       `json:"number,omitempty"`
	Started time.Time `json:"started"`
}

type PacketPong

type PacketPong struct {
	Number  int       `json:"number,omitempty"`
	Started time.Time `json:"started"`
}

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 ReplicasStatus struct {
	Desired   *int32 `json:"desired,omitempty"`
	Current   *int32 `json:"current,omitempty"`
	Ready     *int32 `json:"ready,omitempty"`
	Available *int32 `json:"available,omitempty"`
}

type RequestLimit

type RequestLimit struct {
	CPU    *int64 `json:"cpu,omitempty"`
	Memory *int64 `json:"memory,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL