interceptor

package
v0.0.0-...-cb92cc7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultInterceptors

type DefaultInterceptors struct {
	Pre  []PreHandler
	Post []PostHandler
}

func (*DefaultInterceptors) PostHandle

func (t *DefaultInterceptors) PostHandle(ctx context.Context, response *http.Response)

func (*DefaultInterceptors) PreHandle

func (t *DefaultInterceptors) PreHandle(ctx context.Context, request *http.Request, header *http.Header) *toktik.RequestInterruptError

type Interceptors

type Interceptors interface {
	PreHandle(ctx context.Context, request *http.Request, header *http.Header) *toktik.RequestInterruptError
	PostHandle(ctx context.Context, response *http.Response)
}

type PostHandler

type PostHandler func(ctx context.Context, response *http.Response)

type PreHandler

type PreHandler func(ctx context.Context, request *http.Request, header *http.Header) *toktik.RequestInterruptError

Jump to

Keyboard shortcuts

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