auditing

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Exclude string = "exclude-from-auditing"
)

Variables

This section is empty.

Functions

func HttpFilter

func HttpFilter(a Auditing, logger *zap.SugaredLogger) restful.FilterFunction

func StreamServerInterceptor

func StreamServerInterceptor(a Auditing, logger *zap.SugaredLogger, shouldAudit func(fullMethod string) bool) grpc.StreamServerInterceptor

func UnaryServerInterceptor

func UnaryServerInterceptor(a Auditing, logger *zap.SugaredLogger, shouldAudit func(fullMethod string) bool) grpc.UnaryServerInterceptor

Types

type Auditing

type Auditing interface {
	Index(...any) error
}

func New

func New(c Config) (Auditing, error)

type Config

type Config struct {
	URL              string
	APIKey           string
	IndexPrefix      string
	RotationInterval Interval
	Log              *zap.SugaredLogger
}

type Interval

type Interval string
var (
	HourlyInterval  Interval = "@hourly"
	DailyInterval   Interval = "@daily"
	MonthlyInterval Interval = "@monthly"
)

Jump to

Keyboard shortcuts

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