httplogging

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpLoggingBehaviour

type AmqpLoggingBehaviour struct {
	Config     *config.LoggingConfiguration
	OnlyUnsafe bool
	// contains filtered or unexported fields
}

func NewAmqpLoggingBehaviour

func NewAmqpLoggingBehaviour(cfg *config.LoggingConfiguration, logger *logging.Logger, tokenVerifier *auth.JwtVerifier) (*AmqpLoggingBehaviour, error)

func (*AmqpLoggingBehaviour) OnAuthenticatedRequest

func (c *AmqpLoggingBehaviour) OnAuthenticatedRequest(req *http.Request, jwt string)

func (*AmqpLoggingBehaviour) Wrap

func (c *AmqpLoggingBehaviour) Wrap(wrapped http.Handler) (http.Handler, error)

type ApacheLoggingBehaviour

type ApacheLoggingBehaviour struct {
	Filename string
}

func (*ApacheLoggingBehaviour) Wrap

func (c *ApacheLoggingBehaviour) Wrap(wrapped http.Handler) (http.Handler, error)

type AuditLogAuth

type AuditLogAuth struct {
	Sub  string `json:"sub"`
	Sudo string `json:"sudo,omitempty"`
	Ip   string `json:"ip"`
}

type AuditLogMessage

type AuditLogMessage struct {
	Auth      AuditLogAuth      `json:"auth"`
	Action    string            `json:"action"`
	Timestamp time.Time         `json:"timestamp"`
	Data      map[string]string `json:"data"`
}

type HttpLogger

type HttpLogger interface {
	Wrap(http.Handler) (http.Handler, error)
}

func LoggerFromConfig

func LoggerFromConfig(config *config.LoggingConfiguration, logger *logging.Logger, verifier *auth.JwtVerifier) (HttpLogger, error)

Jump to

Keyboard shortcuts

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