warning

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package warning is used to handle HTTP warning headers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHook

func DefaultHook() *func(context.Context, *logrus.Logger, string)

func Handle

func Handle(ctx context.Context, log *logrus.Logger, msg string)

func NewContext

func NewContext(ctx context.Context, w *Warning) context.Context

func NewHook

func NewHook(log *logrus.Logger) *func(context.Context, *logrus.Logger, string)

Types

type Warning

type Warning struct {
	List []string
	Hook *func(context.Context, *logrus.Logger, string)
	// contains filtered or unexported fields
}

func FromContext

func FromContext(ctx context.Context) *Warning

func (*Warning) Handle

func (w *Warning) Handle(ctx context.Context, log *logrus.Logger, msg string)

Jump to

Keyboard shortcuts

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