rewrite

package
v0.0.0-...-d07672d Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureOpts

type FeatureOpts struct {
	EnableMetrics bool `json:"enableMetrics,omitempty" yaml:"enableMetrics,omitempty"` // 开启 metrics 记录
}

func NewDefaultFeatureOpts

func NewDefaultFeatureOpts() *FeatureOpts

type PathRewrite

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

func NewPathRewrite

func NewPathRewrite(rewriterConf *PathRewriteConfig, featureOpts *FeatureOpts) *PathRewrite

func (*PathRewrite) RewriteHandler

func (r *PathRewrite) RewriteHandler() gin.HandlerFunc

func (*PathRewrite) Stop

func (r *PathRewrite) Stop()

type PathRewriteConfig

type PathRewriteConfig struct {
	PathRewriteFunc func(header *http.Request) (string, error) `json:"-" yaml:"-"`
	Logger          *zap.SugaredLogger                         `json:"-" yaml:"-"`
}

func NewDefaultPathRewriteConfig

func NewDefaultPathRewriteConfig() *PathRewriteConfig

Jump to

Keyboard shortcuts

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