Versions in this module Expand all Collapse all v7 v7.6.1 Sep 24, 2020 Changes in this version + func CredentialsFromContext(ctx context.Context) (cred *Credentials, t TokenType, ok bool) + func WithCredentials(ctx context.Context, cred *Credentials) context.Context + func WithCredentialsType(ctx context.Context, cred *Credentials, t TokenType) context.Context + type Credentials struct + AccessKey string + SecretKey []byte + func New(accessKey, secretKey string) *Credentials + func (ath *Credentials) AddToken(t TokenType, req *http.Request) error + func (ath *Credentials) Sign(data []byte) (token string) + func (ath *Credentials) SignRequest(req *http.Request) (token string, err error) + func (ath *Credentials) SignRequestV2(req *http.Request) (token string, err error) + func (ath *Credentials) SignWithData(b []byte) (token string) + func (ath *Credentials) VerifyCallback(req *http.Request) (bool, error) + type TokenType int + const TokenQBox + const TokenQiniu