auth

package
v0.3.10-0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigningKeyCache sync.Map // map[string][]byte{}

Functions

func Sign

func Sign(request requests.IRequest, signer Signer) (err error)

对request进行签名

Types

type Credential

type Credential interface {
}

type Signer

type Signer interface {
	GetName() string                                 // 签名算法名称
	GetAccessKeyId() (accessKeyId string, err error) // 签名access key
	GetSecretKey() (secretKey string, err error)     // access secret
	Sign(stringToSign, secretSuffix string) string   // 生成签名结果
}

func NewSignerWithCredential

func NewSignerWithCredential(credential Credential) (signer Signer, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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