authorizationslog

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package authorizationslog emits bounded authorization audit events through log/slog.

Index

Constants

This section is empty.

Variables

View Source
var ErrNilLogger = errors.New("authorization audit logger is nil")

ErrNilLogger reports that New received no logger.

Functions

This section is empty.

Types

type Instrumenter

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

Instrumenter emits a bounded structured audit record for each completed observation. The caller retains ownership of the logger and its handler.

func New

func New(logger *slog.Logger, level slog.Level) (*Instrumenter, error)

New constructs an audit Instrumenter at level and rejects a nil logger.

func (*Instrumenter) Begin

func (instrumenter *Instrumenter) Begin(
	ctx context.Context,
) (context.Context, func(authorization.Event))

Begin starts one bounded authorization audit observation.

func (*Instrumenter) Start

func (instrumenter *Instrumenter) Start(
	ctx context.Context,
) (context.Context, func(authorization.Event))

Start delegates to Begin for compatibility with authorization.Instrumenter.

Jump to

Keyboard shortcuts

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