Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebhookScanLog ¶
type WebhookScanLog struct { UID string Request string Allowed bool ViolationsSummary string DeniableViolations string CreatedAt time.Time }
WebhookScanLog database model for log records
type WebhookScanLogger ¶
type WebhookScanLogger struct {
Test bool
}
WebhookScanLogger handles the logic to push scan logs to db
func NewWebhookScanLogger ¶
func NewWebhookScanLogger() *WebhookScanLogger
NewWebhookScanLogger returns a new WebhookScanLogger struct
func (*WebhookScanLogger) ClearDbFilePath ¶
func (g *WebhookScanLogger) ClearDbFilePath()
ClearDbFilePath used for Tests only - clear the DB file after the tests are done
func (*WebhookScanLogger) FetchLogs ¶
func (g *WebhookScanLogger) FetchLogs() ([]WebhookScanLog, error)
FetchLogs retrieves all the logs from the database
func (*WebhookScanLogger) GetLogURL ¶
func (g *WebhookScanLogger) GetLogURL(host, logUID string) string
GetLogURL returns a url to the UI page for reviewing the validating admission request log
func (*WebhookScanLogger) Log ¶
func (g *WebhookScanLogger) Log(WebhookScanLog WebhookScanLog) error
Log creates a new db record for the admission request
Click to show internal directories.
Click to hide internal directories.