Documentation
¶
Overview ¶
Package incident provides access to functionality for recording and classifying compliance incidents.
Index ¶
- type LoggingReporter
- func (l *LoggingReporter) LogUpdate(ctx context.Context, baseURL, summary, fullURL, details string)
- func (l *LoggingReporter) LogUpdatef(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, ...)
- func (l *LoggingReporter) LogViolation(ctx context.Context, baseURL, summary, fullURL, details string)
- func (l *LoggingReporter) LogViolationf(ctx context.Context, baseURL, summary, fullURL, detailsFmt string, ...)
- type Reporter
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. |
Click to show internal directories.
Click to hide internal directories.