auditx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package auditx provides functions and data for wrapping echoaudit and performing audit logging.

Package auditx provides functions and data for auditing OAuth 2.0-specific events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustViperFlags

func MustViperFlags(v *viper.Viper, flags *pflag.FlagSet)

MustViperFlags sets the flags needed for auditing to work.

func NewMiddleware

func NewMiddleware(ctx context.Context, c Config) (*echoaudit.Middleware, func() error, error)

NewMiddleware creates a new echoaudit middleware with closer function based on the given config.

func SetOutcome

func SetOutcome(c echo.Context, outcome string)

SetOutcome sets the outcome of the auditable event.

func SetSubject

func SetSubject(c echo.Context, subject map[string]string)

SetSubject sets the subject of the auditable event.

Types

type Config

type Config struct {
	Enabled   bool
	Path      string
	Component string
}

Config represents an audit middleware configuration.

Jump to

Keyboard shortcuts

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