Documentation ¶
Index ¶
- func Sha256WithRsa(source, secret string) string
- func ShaHmac1(source, secret string) string
- type AccessKeySigner
- func (signer *AccessKeySigner) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *AccessKeySigner) GetExtraParam() map[string]string
- func (*AccessKeySigner) GetName() string
- func (*AccessKeySigner) GetType() string
- func (*AccessKeySigner) GetVersion() string
- func (signer *AccessKeySigner) Shutdown()
- func (signer *AccessKeySigner) Sign(stringToSign, secretSuffix string) string
- type EcsRamRoleSigner
- func (signer *EcsRamRoleSigner) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *EcsRamRoleSigner) GetExtraParam() map[string]string
- func (*EcsRamRoleSigner) GetName() string
- func (signer *EcsRamRoleSigner) GetSessionCredential() *SessionCredential
- func (*EcsRamRoleSigner) GetType() string
- func (*EcsRamRoleSigner) GetVersion() string
- func (signer *EcsRamRoleSigner) Shutdown()
- func (signer *EcsRamRoleSigner) Sign(stringToSign, secretSuffix string) string
- type RamRoleArnSigner
- func (signer *RamRoleArnSigner) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *RamRoleArnSigner) GetExtraParam() map[string]string
- func (*RamRoleArnSigner) GetName() string
- func (signer *RamRoleArnSigner) GetSessionCredential() *SessionCredential
- func (*RamRoleArnSigner) GetType() string
- func (*RamRoleArnSigner) GetVersion() string
- func (signer *RamRoleArnSigner) Shutdown()
- func (signer *RamRoleArnSigner) Sign(stringToSign, secretSuffix string) string
- type SessionCredential
- type SignerKeyPair
- func (signer *SignerKeyPair) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *SignerKeyPair) GetExtraParam() map[string]string
- func (*SignerKeyPair) GetName() string
- func (*SignerKeyPair) GetType() string
- func (*SignerKeyPair) GetVersion() string
- func (signer *SignerKeyPair) Shutdown()
- func (signer *SignerKeyPair) Sign(stringToSign, secretSuffix string) string
- type SignerV2
- func (signer *SignerV2) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *SignerV2) GetExtraParam() map[string]string
- func (*SignerV2) GetName() string
- func (*SignerV2) GetType() string
- func (*SignerV2) GetVersion() string
- func (signer *SignerV2) Shutdown()
- func (signer *SignerV2) Sign(stringToSign, secretSuffix string) string
- type StsTokenSigner
- func (signer *StsTokenSigner) GetAccessKeyId() (accessKeyId string, err error)
- func (signer *StsTokenSigner) GetExtraParam() map[string]string
- func (*StsTokenSigner) GetName() string
- func (*StsTokenSigner) GetType() string
- func (*StsTokenSigner) GetVersion() string
- func (signer *StsTokenSigner) Shutdown()
- func (signer *StsTokenSigner) Sign(stringToSign, secretSuffix string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sha256WithRsa ¶
Sha256WithRsa returns sh256 secret
Types ¶
type AccessKeySigner ¶
type AccessKeySigner struct {
// contains filtered or unexported fields
}
AccessKeySigner is wrapper of AccessKeyCredential
func NewAccessKeySigner ¶
func NewAccessKeySigner(credential *credentials.AccessKeyCredential) (*AccessKeySigner, error)
NewAccessKeySigner returns AccessKeySigner
func (*AccessKeySigner) GetAccessKeyId ¶
func (signer *AccessKeySigner) GetAccessKeyId() (accessKeyId string, err error)
GetAccessKeyId returns accessKeyId
func (*AccessKeySigner) GetExtraParam ¶
func (signer *AccessKeySigner) GetExtraParam() map[string]string
GetExtraParam doesn't implement
func (*AccessKeySigner) GetName ¶
func (*AccessKeySigner) GetName() string
GetName returns "HMAC-SHA1"
func (*AccessKeySigner) GetVersion ¶
func (*AccessKeySigner) GetVersion() string
GetVersion returns "1.0"
func (*AccessKeySigner) Shutdown ¶
func (signer *AccessKeySigner) Shutdown()
Shutdown doesn't implement
func (*AccessKeySigner) Sign ¶
func (signer *AccessKeySigner) Sign(stringToSign, secretSuffix string) string
Sign returns a signer
type EcsRamRoleSigner ¶
type EcsRamRoleSigner struct {
// contains filtered or unexported fields
}
EcsRamRoleSigner is kind of signer
func NewEcsRamRoleSigner ¶
func NewEcsRamRoleSigner(credential *credentials.EcsRamRoleCredential, commonApi func(*requests.CommonRequest, interface{}) (response *responses.CommonResponse, err error)) (signer *EcsRamRoleSigner, err error)
NewEcsRamRoleSigner returns EcsRamRoleSigner
func (*EcsRamRoleSigner) GetAccessKeyId ¶
func (signer *EcsRamRoleSigner) GetAccessKeyId() (accessKeyId string, err error)
GetAccessKeyId returns accessKeyId
func (*EcsRamRoleSigner) GetExtraParam ¶
func (signer *EcsRamRoleSigner) GetExtraParam() map[string]string
GetExtraParam returns params in map
func (*EcsRamRoleSigner) GetName ¶
func (*EcsRamRoleSigner) GetName() string
GetName returns "HMAC-SHA1"
func (*EcsRamRoleSigner) GetSessionCredential ¶
func (signer *EcsRamRoleSigner) GetSessionCredential() *SessionCredential
GetSessionCredential returns SessionCredential
func (*EcsRamRoleSigner) GetVersion ¶
func (*EcsRamRoleSigner) GetVersion() string
GetVersion returns "1.0"
func (*EcsRamRoleSigner) Shutdown ¶
func (signer *EcsRamRoleSigner) Shutdown()
Shutdown doesn't implement
func (*EcsRamRoleSigner) Sign ¶
func (signer *EcsRamRoleSigner) Sign(stringToSign, secretSuffix string) string
Sign creates a signer
type RamRoleArnSigner ¶
type RamRoleArnSigner struct {
// contains filtered or unexported fields
}
RamRoleArnSigner is kind of signer
func NewRamRoleArnSigner ¶
func NewRamRoleArnSigner(credential *credentials.RamRoleArnCredential, commonApi func(request *requests.CommonRequest, signer interface{}) (response *responses.CommonResponse, err error)) (signer *RamRoleArnSigner, err error)
NewRamRoleArnSigner returns RamRoleArnSigner
func (*RamRoleArnSigner) GetAccessKeyId ¶
func (signer *RamRoleArnSigner) GetAccessKeyId() (accessKeyId string, err error)
GetAccessKeyId returns accessKeyId
func (*RamRoleArnSigner) GetExtraParam ¶
func (signer *RamRoleArnSigner) GetExtraParam() map[string]string
GetExtraParam returns params
func (*RamRoleArnSigner) GetName ¶
func (*RamRoleArnSigner) GetName() string
GetName returns "HMAC-SHA1"
func (*RamRoleArnSigner) GetSessionCredential ¶
func (signer *RamRoleArnSigner) GetSessionCredential() *SessionCredential
GetSessionCredential returns SessionCredential
func (*RamRoleArnSigner) GetVersion ¶
func (*RamRoleArnSigner) GetVersion() string
GetVersion returns "1.0"
func (*RamRoleArnSigner) Shutdown ¶
func (signer *RamRoleArnSigner) Shutdown()
Shutdown doesn't implement
func (*RamRoleArnSigner) Sign ¶
func (signer *RamRoleArnSigner) Sign(stringToSign, secretSuffix string) string
Sign create signer
type SessionCredential ¶
SessionCredential is kind of credential
type SignerKeyPair ¶
type SignerKeyPair struct {
// contains filtered or unexported fields
}
SignerKeyPair is kind of signer
func NewSignerKeyPair ¶
func NewSignerKeyPair(credential *credentials.RsaKeyPairCredential, commonApi func(*requests.CommonRequest, interface{}) (response *responses.CommonResponse, err error)) (signer *SignerKeyPair, err error)
NewSignerKeyPair returns SignerKeyPair
func (*SignerKeyPair) GetAccessKeyId ¶
func (signer *SignerKeyPair) GetAccessKeyId() (accessKeyId string, err error)
GetAccessKeyId returns accessKeyId
func (*SignerKeyPair) GetExtraParam ¶
func (signer *SignerKeyPair) GetExtraParam() map[string]string
GetExtraParam returns params
func (*SignerKeyPair) GetVersion ¶
func (*SignerKeyPair) GetVersion() string
GetVersion returns "1.0"
func (*SignerKeyPair) Sign ¶
func (signer *SignerKeyPair) Sign(stringToSign, secretSuffix string) string
Sign create signer
type SignerV2 ¶
type SignerV2 struct {
// contains filtered or unexported fields
}
SignerV2 is wrapper of credential
func NewSignerV2 ¶
func NewSignerV2(credential *credentials.RsaKeyPairCredential) (*SignerV2, error)
NewSignerV2 returns SignerV2
func (*SignerV2) GetAccessKeyId ¶
GetAccessKeyId returns accessKeyId
func (*SignerV2) GetExtraParam ¶
GetExtraParam returns params
type StsTokenSigner ¶
type StsTokenSigner struct {
// contains filtered or unexported fields
}
StsTokenSigner is kind of Signer
func NewStsTokenSigner ¶
func NewStsTokenSigner(credential *credentials.StsTokenCredential) (*StsTokenSigner, error)
NewStsTokenSigner returns StsTokenSigner
func (*StsTokenSigner) GetAccessKeyId ¶
func (signer *StsTokenSigner) GetAccessKeyId() (accessKeyId string, err error)
GetAccessKeyId returns accessKeyId
func (*StsTokenSigner) GetExtraParam ¶
func (signer *StsTokenSigner) GetExtraParam() map[string]string
GetExtraParam returns params
func (*StsTokenSigner) GetName ¶
func (*StsTokenSigner) GetName() string
GetName returns "HMAC-SHA1"
func (*StsTokenSigner) GetVersion ¶
func (*StsTokenSigner) GetVersion() string
GetVersion returns ""
func (*StsTokenSigner) Shutdown ¶
func (signer *StsTokenSigner) Shutdown()
Shutdown doesn't implement
func (*StsTokenSigner) Sign ¶
func (signer *StsTokenSigner) Sign(stringToSign, secretSuffix string) string
Sign creates signer