audit

package
v2.2.8-ent2-rc2+incomp... Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuditLogFilter

func NewAuditLogFilter(ctx context.Context, auditWriter *LogWriter, next http.Handler) http.Handler

Types

type LogWriter

type LogWriter struct {
	Level  int
	Output *lumberjack.Logger
}

func NewLogWriter

func NewLogWriter(path string, level, maxAge, maxBackup, maxSize int) *LogWriter

type UserInfo

type UserInfo struct {
	Name  string   `json:"name,omitempty"`
	Group []string `json:"group,omitempty"`
	// RequestUser is the --as user
	RequestUser string `json:"requestUser,omitempty"`
	// RequestGroups is the --as-group list
	RequestGroups []string `json:"requestGroups,omitempty"`
}

func FromContext

func FromContext(ctx context.Context) (*UserInfo, bool)

func GetUserInfo

func GetUserInfo(req *http.Request) *UserInfo

Jump to

Keyboard shortcuts

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