auditor

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlessingEntry

type BlessingEntry struct {
	Email              string
	Caveats            []security.Caveat
	Timestamp          time.Time // Time when the blesings were created.
	RevocationCaveatID string
	Blessings          security.Blessings
	DecodeError        error
}

BlessingEntry contains important logged information about a blessed principal.

type BlessingLogReader

type BlessingLogReader interface {
	Read(ctx *context.T, email string) <-chan BlessingEntry
}

BlessingLogReader provides the Read method to read audit logs. Read returns a channel of BlessingEntrys whose extension matches the provided email.

func NewMockBlessingAuditor

func NewMockBlessingAuditor() (audit.Auditor, BlessingLogReader)

func NewSQLBlessingAuditor

func NewSQLBlessingAuditor(ctx *context.T, sqlDB *sql.DB) (audit.Auditor, BlessingLogReader, error)

NewSQLBlessingAuditor returns an auditor for wrapping a principal with, and a BlessingLogReader for reading the audits made by that auditor. The config is used to construct the connection to the SQL database that the auditor and BlessingLogReader use.

Jump to

Keyboard shortcuts

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