From bee1165966400385400bc907cacac2e95231c22f Mon Sep 17 00:00:00 2001 From: Alex Vulaj Date: Thu, 8 Feb 2024 00:06:11 -0500 Subject: [PATCH] Add doc_references field to servicelogs --- internal/servicelog/template.go | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/internal/servicelog/template.go b/internal/servicelog/template.go index 64473cdc..6ef76ed5 100644 --- a/internal/servicelog/template.go +++ b/internal/servicelog/template.go @@ -7,15 +7,16 @@ import ( // Message is the base template structure type Message struct { - Severity string `json:"severity"` - ServiceName string `json:"service_name"` - ClusterUUID string `json:"cluster_uuid,omitempty"` - ClusterID string `json:"cluster_id,omitempty"` - Summary string `json:"summary"` - Description string `json:"description"` - InternalOnly bool `json:"internal_only"` - EventStreamID string `json:"event_stream_id"` - SubscriptionID string `json:"subscription_id,omitempty"` + Severity string `json:"severity"` + ServiceName string `json:"service_name"` + ClusterUUID string `json:"cluster_uuid,omitempty"` + ClusterID string `json:"cluster_id,omitempty"` + Summary string `json:"summary"` + Description string `json:"description"` + InternalOnly bool `json:"internal_only"` + EventStreamID string `json:"event_stream_id"` + SubscriptionID string `json:"subscription_id,omitempty"` + DocReferences []string `json:"doc_references"` } func (m *Message) GetSeverity() string { @@ -54,6 +55,10 @@ func (m *Message) GetSubscriptionID() string { return m.SubscriptionID } +func (m *Message) GetDocReferences() []string { + return m.DocReferences +} + func (m *Message) ReplaceWithFlag(variable, value string) { m.Severity = strings.ReplaceAll(m.Severity, variable, value) m.ServiceName = strings.ReplaceAll(m.ServiceName, variable, value)