Documentation ¶
Overview ¶
Package domain is a container of all of the domain types and interfaces that are used across multiple packages within the service.
This package is also the container for all domain errors leveraged by the service. Each error here should represent a specific condition that needs to be communicated across interface boundaries.
Generally speaking, this package contains no executable code. All elements are expected to be either pure data containers that have no associated methods or interface definitions that have no corresponding implementations in this package. The notable exception to this are the domain error types which are required to define a corresponding Error() method. Because these errors provide executable code they must also have corresponding tests. Only domain error types are allowed to deviate from the "no executable code" rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletedScan ¶
type CompletedScan struct { ScanID string SiteID string ScanType string StartTime time.Time EndTime time.Time }
CompletedScan represents identifiers for a completed Nexpose scan.
type DependencyChecker ¶ added in v0.4.0
DependencyChecker represents an interface for checking external dependencies
type LogFn ¶
LogFn is the recommended way to extract a logger from the context.
var LoggerFromContext LogFn = runhttp.LoggerFromContext
LoggerFromContext is a concrete implementation of the LogFn interface.
type Producer ¶
type Producer interface {
Produce(ctx context.Context, scan CompletedScan) error
}
The Producer interface is used to produce completed scans onto a queue.
type ScanFetcher ¶
ScanFetcher fetchs scans completed from the provided time until now.
type StatFn ¶
StatFn is the recommended way to extract a metrics client from the context.
var StatFromContext StatFn = runhttp.StatFromContext
StatFromContext is a concrete implementation of the StatFn interface.
type TimestampFetcher ¶
TimestampFetcher provides methods to retrieve a timestamp from storage.
type TimestampNotFound ¶
type TimestampNotFound struct{}
TimestampNotFound is used to indicate that no timestamp value exists in storage.
func (TimestampNotFound) Error ¶
func (e TimestampNotFound) Error() string