hashresponse

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l logx.Logger)

// 自定义的logger,建议实例化赋予

Types

type HashAlgorithm

type HashAlgorithm string

HashAlgorithm 定义支持的哈希算法类型

const (
	MD5    HashAlgorithm = "Md5"
	SHA1   HashAlgorithm = "Sha1"
	SHA256 HashAlgorithm = "Sha256"
)

type HashBuilder added in v0.1.6

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

HashBuilder 是中间件构建器

func NewBuilder

func NewBuilder() *HashBuilder

NewBuilder 创建一个新的构建器实例

func (*HashBuilder) Build added in v0.1.6

func (b *HashBuilder) Build() gin.HandlerFunc

Build 构建 Gin 中间件

func (*HashBuilder) SetHash added in v0.1.6

func (hashBuilder *HashBuilder) SetHash(c *gin.Context, hv *bodyTemp)

func (*HashBuilder) WithAlgorithm added in v0.1.6

func (hashBuilder *HashBuilder) WithAlgorithm(algorithm HashAlgorithm, hasherFunc func() hash.Hash) *HashBuilder

WithAlgorithm 添加需要计算的哈希算法

func (*HashBuilder) WithMd5 added in v0.1.6

func (hashBuilder *HashBuilder) WithMd5() *HashBuilder

func (*HashBuilder) WithSha1 added in v0.1.6

func (hashBuilder *HashBuilder) WithSha1() *HashBuilder

func (*HashBuilder) WithSha256 added in v0.1.6

func (hashBuilder *HashBuilder) WithSha256() *HashBuilder

Jump to

Keyboard shortcuts

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