incident

package
v0.0.0-...-1dc6284 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package incident provides access to functionality for recording and classifying compliance incidents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingReporter

type LoggingReporter struct {
}

LoggingReporter implements the Reporter interface by simply emitting log messages.

func (*LoggingReporter) LogUpdate

func (l *LoggingReporter) LogUpdate(ctx context.Context, baseURL, summary, fullURL, details string)

LogUpdate emits a log message for the incident details.

func (*LoggingReporter) LogUpdatef

func (l *LoggingReporter) LogUpdatef(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, args ...interface{})

LogUpdatef emits a log message for the incident details, formatting parameters along the way.

func (*LoggingReporter) LogViolation

func (l *LoggingReporter) LogViolation(ctx context.Context, baseURL, summary, fullURL, details string)

LogViolation emits a log message for the incident details.

func (*LoggingReporter) LogViolationf

func (l *LoggingReporter) LogViolationf(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, args ...interface{})

LogUpdatef emits a log message for the incident details, formatting parameters along the way.

type Reporter

type Reporter interface {
	// LogUpdate records a non-violation incident with the given parameters.
	// The baseURL, summary and category fields should be stable across
	// multiple similar incidents to allow aggregation. Information that
	// varies between instances of the 'same' incident should be included in
	// the fullURL or details field.
	LogUpdate(ctx context.Context, baseURL, summary, fullURL, details string)
	LogUpdatef(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, args ...interface{})

	// LogViolation records a RFC/Policy violation incident with the given parameters.
	LogViolation(ctx context.Context, baseURL, summary, fullURL, details string)
	LogViolationf(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, args ...interface{})
}

Reporter describes a mechanism for recording compliance incidents.

Directories

Path Synopsis
Package mysql provides a MySQL based implementation of incident management.
Package mysql provides a MySQL based implementation of incident management.
Package testonly contains fakes for use in tests that interact with incident reporting.
Package testonly contains fakes for use in tests that interact with incident reporting.

Jump to

Keyboard shortcuts

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