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
Click to show internal directories.
Click to hide internal directories.