GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — audit package - github.com/majorcontext/keep/internal/audit - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • unchecked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

github.com/majorcontext/keep

Links

  • Open Source Insights Logo Open Source Insights

Documentation ¶

Overview ¶

Package audit provides structured audit logging for Keep evaluations.

Index ¶

  • type Logger
    • func NewLogger(w io.Writer) *Logger
    • func NewLoggerFromOutput(output string) (*Logger, io.Closer, error)
    • func (l *Logger) Log(entry engine.AuditEntry)

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type Logger ¶

type Logger struct {
	// contains filtered or unexported fields
}

Logger writes audit entries as JSON Lines to a writer.

func NewLogger ¶

func NewLogger(w io.Writer) *Logger

NewLogger creates a logger that writes to the given writer.

func NewLoggerFromOutput ¶

func NewLoggerFromOutput(output string) (*Logger, io.Closer, error)

NewLoggerFromOutput creates a logger from an output string. "stdout" -> os.Stdout, "stderr" -> os.Stderr, anything else -> file path.

func (*Logger) Log ¶

func (l *Logger) Log(entry engine.AuditEntry)

Log serializes the audit entry as JSON and writes it as a single line. Thread-safe.

Source Files ¶

View all Source files
  • logger.go
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.