adapter

package
v0.0.0-...-91422f1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decompressor

type Decompressor struct{}

func NewDecompressor

func NewDecompressor() *Decompressor

func (*Decompressor) Decompress

func (d *Decompressor) Decompress(encoding string, body []byte) ([]byte, error)

type InterceptAdapter

type InterceptAdapter struct {
	// contains filtered or unexported fields
}

func NewInterceptAdapter

func NewInterceptAdapter(
	certGen port.CertificateIssuer,
	barrier port.BarrierPort,
	interceptor port.InterceptorPort,
	decompressor port.Decompressor,
	idGen port.IDGenerator,
	forwarder port.HTTPForwarder,
	requestCh chan model.Request,
) *InterceptAdapter

func (*InterceptAdapter) Barrier

func (i *InterceptAdapter) Barrier() port.BarrierPort

func (*InterceptAdapter) Close

func (a *InterceptAdapter) Close()

func (*InterceptAdapter) HandleConn

func (i *InterceptAdapter) HandleConn(conn net.Conn)

func (*InterceptAdapter) InterceptRoundTrip

func (i *InterceptAdapter) InterceptRoundTrip(req *http.Request, w io.Writer) error

InterceptRoundTrip runs the full interception pipeline for a single request: build model, intercept, check barrier, forward, build response, intercept response. It writes the final HTTP response to w.

func (*InterceptAdapter) Interceptor

func (i *InterceptAdapter) Interceptor() port.InterceptorPort

func (*InterceptAdapter) RequestCh

func (i *InterceptAdapter) RequestCh() <-chan model.Request

type UUIDGenerator

type UUIDGenerator struct{}

func NewUUIDGenerator

func NewUUIDGenerator() *UUIDGenerator

func (*UUIDGenerator) New

func (g *UUIDGenerator) New() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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