notewriter

package
v0.0.0-...-debdcc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoteWriter

type NoteWriter struct {
	// contains filtered or unexported fields
}

func New

func New(investigationName string, logger *zap.SugaredLogger) *NoteWriter

New initializes a new NoteWriter with an optional logger. The note is initialized with an investigation header in the following format: 🤖 Automated %s pre-investigation 🤖 ===========================

E.g. 🤖 Automated CHGM pre-investigation 🤖 ===========================

func (*NoteWriter) AppendAutomation

func (n *NoteWriter) AppendAutomation(format string, a ...any)

AppendAutomation should to indicate CAD took an automated action, e.g. 🤖 Sent service log: "This is the service log message" Format appended to the note: 🤖 <my string>\n

func (*NoteWriter) AppendSuccess

func (n *NoteWriter) AppendSuccess(format string, a ...any)

AppendSuccess should be used when a CAD check succeeded, e.g. ✅ Network Verifier Passed Format appended to the note: ✅ <my string>\n

func (*NoteWriter) AppendWarning

func (n *NoteWriter) AppendWarning(format string, a ...any)

AppendWarning should be used when a CAD check showed an issue, e.g. ⚠️ Network Verifier Failed with the following errors: error1, error2, error3 Format appended to the note: ⚠️ <my string>\n

func (*NoteWriter) String

func (n *NoteWriter) String() string

String() returns the current full string format of the built note

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL