interceptors

package
v0.0.0-...-08ba287 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(username, password string) interceptor.Middleware

BasicAuth returns an interceptor that sets Basic authentication on every outgoing request.

interceptor.NewTransport(nil,
    interceptors.BasicAuth("username", "password"),
)
func Header(key, value string) interceptor.Middleware

Header returns an interceptor that sets a header on every outgoing request.

interceptor.NewTransport(nil,
    interceptors.Header("User-Agent", "MyApp/1.0"),
)

Types

type RequestLoggingOptions

type RequestLoggingOptions struct {
	Logger           *slog.Logger
	HeadersToLog     []string
	SensitiveHeaders []string
}

RequestLoggingOptions configures request logging behavior.

Jump to

Keyboard shortcuts

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