Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding message fields #2

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions messaging/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ type DeleteObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`
}

type GetObjectMessage struct {
Expand All @@ -33,6 +36,9 @@ type GetObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`
}

type NewChecksumMessage struct {
Expand All @@ -43,6 +49,9 @@ type NewChecksumMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`
}

type NewObjectMessage struct {
Expand All @@ -52,7 +61,17 @@ type NewObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`
Object []byte `json:"patch"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`

// annotations - "kubescape.io/wlid"
WLID string `json:"wlid"`

// metadata - creationTimestamp
CreationTimestamp string `json:"creationTimestamp"`

Object []byte `json:"patch"`
}

type PatchObjectMessage struct {
Expand All @@ -63,7 +82,17 @@ type PatchObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`
Patch []byte `json:"patch"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`

// annotations - "kubescape.io/wlid"
WLID string `json:"wlid"`

// metadata - creationTimestamp
CreationTimestamp string `json:"creationTimestamp"`

Patch []byte `json:"patch"`
}

type PutObjectMessage struct {
Expand All @@ -73,7 +102,17 @@ type PutObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`
Object []byte `json:"patch"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`

// annotations - "kubescape.io/wlid"
WLID string `json:"wlid"`

// metadata - creationTimestamp
CreationTimestamp string `json:"creationTimestamp"`

Object []byte `json:"patch"`
}

type VerifyObjectMessage struct {
Expand All @@ -84,6 +123,9 @@ type VerifyObjectMessage struct {
Kind string `json:"kind"`
MsgId string `json:"msgId"`
Name string `json:"name"`

// annotations - "kubescape.io/instance-id"
InstanceID string `json:"instanceId"`
}

type ServerConnectedMessage struct {
Expand Down
Loading