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

docs: annotate the Notification struct #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release-Tag
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -28,4 +30,4 @@ jobs:
tag_name: v0.0.${{ github.run_number }}
release_name: Release v0.0.${{ github.run_number }}
draft: false
prerelease: false
prerelease: false
22 changes: 18 additions & 4 deletions notificationserver/datastructures.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
package notificationserver

// Notification passed between servers
// Notification is a notification passed between the Gateway servers
type Notification struct {
Target map[string]string `json:"target"`
SendSynchronicity bool `json:"sendSynchronicity"`
Notification interface{} `json:"notification"`
// Target for the notification
//
// Describes attributes of the target that should receive the notification
//
// Required: true
// Example: { "cluster": "minikube", "customerGUID": "b5b28ef9-d297-4a93-aec4-22de5b21e802", "component": "websocket" }
Target map[string]string `json:"target"`
// Whether to send the message synchronously
//
// If `true`, waits for the message to be sent, else the message is sent asynchronously.
// Example: true
// Default: false
SendSynchronicity bool `json:"sendSynchronicity"`
// Body of the notification
//
// Example: { "commands": [ { "CommandName": "kubescapeScan", "args": { "scanV1": { "submit": true, "excludeNamespaces": ["kube-system"] } } } ] }
Notification interface{} `json:"notification"`
}