signature

package
v0.0.0-...-ae1f611 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ec *config.Signature, watcher config.Watcher)

Types

type Signature

type Signature interface {
	// Generate 生成签名
	Generate(content []byte) (int64, string, error)

	// Verify 验证签名
	Verify(content []byte, sign string, ts int64) error

	// IsWhitelist 是否为白名单
	IsWhitelist(name string) bool

	// Server 服务端中间件
	Server() middleware.Middleware

	// Client 客户端中间件
	Client(conf *config.Signature) middleware.Middleware
}

func Instance

func Instance() Signature

Jump to

Keyboard shortcuts

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