Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSPReport ¶
type CSPReport struct { Report Body struct { DocumentURI string `json:"document-uri"` Referrer string `json:"referrer"` BlockedURI string `json:"blocked-uri"` ViolatedDirective string `json:"violated-directive"` EffectiveDirective string `json:"effective-directive"` OriginalPolicy string `json:"original-policy"` } `json:"csp-report"` }
CSPReport is a Content Security Policy report as per http://www.w3.org/TR/CSP/
type Logger ¶
type Logger interface {
Log(...interface{}) error
}
Logger is a simple logging wrapper interface
type MetricHistogram ¶
type MetricHistogram interface {
Update(int64)
}
MetricHistogram is a simple histogram
type MetricStorage ¶
type MetricStorage interface { RegisterHistogram(string) MetricHistogram RegisterCounter(string) MetricCounter }
MetricStorage is a way to store internal application metrics
type PKPReport ¶
type PKPReport struct { Report DateTime string `json:"date-time"` Hostname string `json:"hostname"` Port int `json:"port"` EffectiveExpirationDate string `json:"effective-expiration-date"` IncludeSubdomains bool `json:"include-subdomains"` NotedHostname string `json:"noted-hostname"` ServedCertificateChain []string `json:"served-certificate-chain"` ValidatedCertificateChain []string `json:"validated-certificate-chain"` KnownPins []string `json:"known-pins"` }
PKPReport is a Public Key Pinning report as per https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21
type Report ¶
Report is a generic report type (they don't have much in common)
func (*Report) SetTimestamp ¶
SetTimestamp sets timestamp for Elastic default sorting
type ReportStorage ¶
type ReportStorage interface {
AddReport(Reportable)
}
ReportStorage is a way to store incoming reports
type Reportable ¶
Reportable structs can be saved to Elastic - their Type defines index to save to; - they can hold Timestamp for Elastic to sort on.
type Service ¶ added in v1.1.0
Service is started and stopped in main function, which assembles services into a working application
type StacktraceJSReport ¶
type StacktraceJSReport struct { Report Message string `json:"message"` Stack []struct { FunctionName string `json:"functionName"` FileName string `json:"fileName"` LineNumber int `json:"lineNumber"` ColumnNumber int `json:"columnNumber"` } `json:"stack"` // These fields are not a part of StacktraceJS specification, but are useful for error reports Browser *struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` } `json:"browser,omitempty"` OS *struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` } `json:"os,omitempty"` URL string `json:"url,omitempty"` UserID string `json:"userId,omitempty"` StackHash string `json:"stackHash,omitempty"` ScriptURL string `json:"scriptUrl,omitempty"` }
StacktraceJSReport is a universal browser stacktrace format as per https://github.com/stacktracejs/stacktrace.js#stacktracereportstackframes-url-message--promisestring
func (StacktraceJSReport) GetType ¶
func (s StacktraceJSReport) GetType() string
GetType returns report type