plugin

package
v0.0.0-...-7a8aca8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapperAdaptor

func WrapperAdaptor(adaptor adaptor.Adaptor, plugins ...Plugin) adaptor.Adaptor

Types

type Plugin

type Plugin interface {
	GetRequestURL(
		meta *meta.Meta,
		store adaptor.Store,
		c *gin.Context,
		do adaptor.GetRequestURL,
	) (adaptor.RequestURL, error)

	SetupRequestHeader(
		meta *meta.Meta,
		store adaptor.Store,
		c *gin.Context,
		req *http.Request,
		do adaptor.SetupRequestHeader,
	) error

	ConvertRequest(
		meta *meta.Meta,
		store adaptor.Store,
		req *http.Request,
		do adaptor.ConvertRequest,
	) (adaptor.ConvertResult, error)

	DoRequest(
		meta *meta.Meta,
		store adaptor.Store,
		c *gin.Context,
		req *http.Request,
		do adaptor.DoRequest,
	) (*http.Response, error)

	DoResponse(
		meta *meta.Meta,
		store adaptor.Store,
		c *gin.Context,
		resp *http.Response,
		do adaptor.DoResponse,
	) (model.Usage, adaptor.Error)
}

adaptor hook

Directories

Path Synopsis
Package patch provides configuration types and structures for the patch plugin.
Package patch provides configuration types and structures for the patch plugin.

Jump to

Keyboard shortcuts

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