types.go | |
---|---|
|
|
Package types contains declaration of various data types (usually structures) used elsewhere in the CCX Notification Service code. |
|
Generated documentation is available at: https://pkg.go.dev/github.com/RedHatInsights/ccx-notification-service/types Documentation in literate-programming-style is available at: https://redhatinsights.github.io/ccx-notification-service/packages/types/types.html |
|
Timestamp represents any timestamp in a form gathered from database TODO: need to be improved |
|
KafkaOffset is a data type representing offset in Kafka topic. |
|
OrgID data type represents organization ID. |
|
AccountNumber represents account number for a given report. |
|
ClusterName data type represents name of cluster in format c8590f31-e97e-4b85-b506-c45ce1911a12 (ie. in UUID format). |
|
ClusterReport represents cluster report |
|
DBDriver type for db driver enum |
|
NotificationTypeID represents ID value in |
|
StateID represents ID value in |
|
EventTarget matches the backend int code in the database where the notifications are sent (CCXDEV-8767) |
|
ProducerMessage is a byte array (typically converted JSON) to be processed by one of the Producer implementations |
|
DBDriverSQLite3 shows that db driver is sqlite |
|
DBDriverPostgres shows that db driver is postgres |
|
DBDriverGeneral general sql(used for mock now) |
|
NotificationBackendTarget matches the notification backend int code in the database (CCXDEV-8767) |
|
ServiceLogTarget matches the service log int code in the database (CCXDEV-8767) |
|
ClusterEntry represents the entries retrieved from the DB |
|
NotificationType represents one record from |
|
NotificationTypes contains all IDs for all possible notification types |
|
State represents one record from |
|
States contains all IDs for all possible states |
|
Rules is a slice of RuleContent objects |
|
RulesMap contains a map of RuleContent objects accesible indexed by rule names |
|
TagsSet contains a set of tags |
|
MissingMandatoryFile is an error raised while parsing, when a mandatory file is missing |
|
CliFlags represents structure holding all command line arguments/flags. |
|
ReportContent represents the array of items expected in a report |
|
Report represents report send in a message consumed from any broker |
|
RuleID represents type for rule id |
|
RuleName represents type for rule name |
|
ModuleName represents type for module name |
|
ErrorKey represents type for error key |
|
ReportItem represents a single (hit) rule of the string encoded report |
|
EvaluatedReportItem represents a report item with additional information after evaluation |
|
EventType represents the allowed event types in notification messages |
|
Event types as enum |
|
Event types string representation |
|
ToString function returns string representation of given event type |
|
EventMetadata represents the metadata of the sent payload. It is expected to be an empty struct as of today |
|
EventPayload is a JSON string containing all the data required by the app to compose the various messages (Email, webhook, ...). |
|
Event is a structure containing the payload and its metadata. |
|
Digest is a structure containing the counters for weekly digest |
|
NotificationContext represents the extra information that is common to all the events that are sent in this message as a JSON string (escaped) |
|
NotificationMessage represents content of messages sent to the notification platform topic in Kafka. |
|
NotificationRecord structure represents one record stored in |
|
ClusterOrgKey is a slice with two items: an organization ID and a cluster UUID |
|
NotifiedRecordsPerCluster maps a string representation of ClusterOrgKey to a NotificationRecord |
|
NotifiedRecordsPerClusterByTarget let us split the notified records by their target (CCXDEV-8767) |
|
RenderedReport contains all rendered text fields for specific cluster report |
|
TemplateRendererOutput is an output structure from content template renderer |
|
ReportData is part of the request to content template renderer containing report data |
|
TemplateRendererRequestBody is a structure to be sent in request body to content template renderer |
|
ServiceLogEntry is a structure to be sent to Service Log |
|
MakeSetOfTags helper function makes set of tags from given list of tags |
|