sign

package
v0.41.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorInvalidSignParams 无效的签名参数
	ErrorInvalidSignParams = errors.New("invalid sign param")
)

Functions

func SWithKey added in v0.18.3

func SWithKey(values map[string][]string, key string) (string, error)

SWithKey 计算签名 key 密钥

func SetCalcFunc

func SetCalcFunc(f func(string, string) string)

SetCalcFunc 设置签名函数

func SetDebug

func SetDebug(b bool)

SetDebug 是否打印日志

func SetIgnoreField

func SetIgnoreField(field string)

SetIgnoreField 设置忽略的字段

func SetLog

func SetLog(l logger.Logger)

SetLog 设置日志

func SetSecretKey

func SetSecretKey(key string)

SetSecretKey 设置签名密钥

func Sign

func Sign(values map[string]string) (string, error)

Sign 计算签名,使用全局密钥 secretKey

func Signs

func Signs(values map[string][]string) (string, error)

Signs 计算签名,使用全局密钥 secretKey

func WithKey added in v0.18.3

func WithKey(values map[string]string, key string) (string, error)

WithKey 计算签名 key 密钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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