dblogs

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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