middleware

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: LGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLicenseNotValid = errors.New("wutong region license not valid")

Functions

func APIVersion

func APIVersion(next http.Handler) http.Handler

APIVersion api版本

func GetLicenseCrtAndSig added in v1.2.0

func GetLicenseCrtAndSig() (crt *x509.Certificate, sig []byte, err error)

GetLicenseCrtAndSig 获取证书和签名(从kubernetes secret中获取)

func InitApplication

func InitApplication(next http.Handler) http.Handler

InitApplication -

func InitPlugin

func InitPlugin(next http.Handler) http.Handler

InitPlugin 实现plugin init中间件

func InitService

func InitService(next http.Handler) http.Handler

InitService 实现serviceinit中间件

func InitTenantEnv added in v1.1.0

func InitTenantEnv(next http.Handler) http.Handler

InitTenantEnv 实现中间件

func InitVM added in v1.7.0

func InitVM(next http.Handler) http.Handler

InitVM -

func InitVMID added in v1.9.0

func InitVMID(next http.Handler) http.Handler

InitVMID -

func InitVeleroBackupOrRestore added in v1.9.0

func InitVeleroBackupOrRestore(next http.Handler) http.Handler

InitVeleroBackupOrRestore

func License

func License(next http.Handler) http.Handler

License

func Proxy

func Proxy(next http.Handler) http.Handler

Proxy 反向代理中间件

func SetLog

func SetLog(next http.Handler) http.Handler

SetLog SetLog

func Token

func Token(next http.Handler) http.Handler

Token 简单token验证

func VerifyLicense added in v1.2.0

func VerifyLicense(licensePlaintextKey string, cert *x509.Certificate, sig []byte) (err error)

VerifyLicense 许可证验证:验证证书,并使用证书中的公钥对签名进行验证

func WrapEL

func WrapEL(f http.HandlerFunc, target, optType string, synType int) http.HandlerFunc

WrapEL wrap eventlog, handle event log before and after process

Types

type LicenseCache added in v1.2.0

type LicenseCache struct {
	Content   string
	Valid     bool
	CacheTime time.Time
}

Jump to

Keyboard shortcuts

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