You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change: introduce ordering to query filter enums (#251)
## What
Introduce order (base on declaration of individual enum values) to query
filter enums.
## Why
To allow slices of those enum values to be orderable, so in all places
in the system they look and behave the same.
## References
- [AT-2744](https://jira.greenbone.net/browse/AT-2744)
- [AT-2806](https://jira.greenbone.net/browse/AT-2806)
## Checklist
- [x] Tests _(newly added code have 100% tests coverage)_
NewErrorGenericResponse returns a [ErrorResponse](<#ErrorResponse>) of type Generic with the given error message. The message is handled the same as [fmt.Println](<https://pkg.go.dev/fmt/#Println>).
@@ -116,7 +116,7 @@ The job queue is designed to be used in situations where multiple requests of th
116
116
If a request is added to the queue while another request is being processed, the new request will be added to the queue and processed after the current request has finished. If there is already a request in the queue, the old request will be considered obsolete and replaced by the new request. \[jobQueue\_test.go\]\(jobQueue\_test.go\) illustrates this behaviour.
117
117
118
118
<a name="Request"></a>
119
-
## type [Request](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/jobQueue/jobQueue.go#L15-L17>)
119
+
## type Request
120
120
121
121
Request is a request to be processed by the queue and allows to provide an ID for identification
NewClient returns a new [Client](<#Client>) with the notification service address \(host:port\) set. As httpClient you can use e.g. \[http.DefaultClient\].
CreateNotification sends a notification to the notification service. It is retried up to the configured number of retries with an exponential backoff, So it can take some time until the functions returns.
GetAuthenticationToken retrieves an authentication token using client credentials. It constructs a form\-encoded request, sends it with retry logic, and parses the response.
62
62
63
63
<a name="Config"></a>
64
-
## type [Config](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/notifications/notification.go#L37-L42>)
64
+
## type Config
65
65
66
66
Config configures the notification service client
67
67
@@ -75,7 +75,7 @@ type Config struct {
75
75
```
76
76
77
77
<aname="KeycloakAuthentication"></a>
78
-
## type [KeycloakAuthentication](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/notifications/notification.go#L46-L52>)
78
+
## type KeycloakAuthentication
79
79
80
80
KeycloakAuthentication holds the credentials and configuration details required for Keycloak authentication in the notification service.
81
81
@@ -90,7 +90,7 @@ type KeycloakAuthentication struct {
90
90
```
91
91
92
92
<aname="Level"></a>
93
-
## type [Level](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/notifications/model.go#L34>)
93
+
## type Level
94
94
95
95
Level describes the severity of the notification
96
96
@@ -109,7 +109,7 @@ const (
109
109
```
110
110
111
111
<aname="Notification"></a>
112
-
## type [Notification](<https://github.com/greenbone/opensight-golang-libraries/blob/main/pkg/notifications/model.go#L9-L18>)
0 commit comments