signers

package
v0.0.0-...-ce01f02 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sha256WithRsa

func Sha256WithRsa(source, secret string) string

Sha256WithRsa returns sh256 secret

func ShaHmac1

func ShaHmac1(source, secret string) string

ShaHmac1 returns sha-hmac1 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) GetType

func (*AccessKeySigner) GetType() string

GetType returns ""

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) GetType

func (*EcsRamRoleSigner) GetType() string

GetType returns ""

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 OIDCSigner

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

OIDCSigner is kind of signer

func NewOIDCSigner

func NewOIDCSigner(credential *credentials.OIDCCredential) (signer *OIDCSigner, err error)

NewOIDCSigner returns OIDCSigner

func (*OIDCSigner) GetAccessKeyId

func (signer *OIDCSigner) GetAccessKeyId() (accessKeyId string, err error)

GetAccessKeyId returns accessKeyId

func (*OIDCSigner) GetExtraParam

func (signer *OIDCSigner) GetExtraParam() map[string]string

GetExtraParam returns params

func (*OIDCSigner) GetName

func (*OIDCSigner) GetName() string

GetName returns "HMAC-SHA1"

func (*OIDCSigner) GetSessionCredential

func (signer *OIDCSigner) GetSessionCredential() *SessionCredential

GetSessionCredential returns SessionCredential

func (*OIDCSigner) GetType

func (*OIDCSigner) GetType() string

GetType returns ""

func (*OIDCSigner) GetVersion

func (*OIDCSigner) GetVersion() string

GetVersion returns "1.0"

func (*OIDCSigner) Shutdown

func (signer *OIDCSigner) Shutdown()

Shutdown doesn't implement

func (*OIDCSigner) Sign

func (signer *OIDCSigner) Sign(stringToSign, secretSuffix string) string

Sign create 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) GetType

func (*RamRoleArnSigner) GetType() string

GetType returns ""

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

type SessionCredential struct {
	AccessKeyId     string
	AccessKeySecret string
	StsToken        string
}

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) GetName

func (*SignerKeyPair) GetName() string

GetName returns "HMAC-SHA1"

func (*SignerKeyPair) GetType

func (*SignerKeyPair) GetType() string

GetType returns ""

func (*SignerKeyPair) GetVersion

func (*SignerKeyPair) GetVersion() string

GetVersion returns "1.0"

func (*SignerKeyPair) Shutdown

func (signer *SignerKeyPair) Shutdown()

Shutdown doesn't implement

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

func (signer *SignerV2) GetAccessKeyId() (accessKeyId string, err error)

GetAccessKeyId returns accessKeyId

func (*SignerV2) GetExtraParam

func (signer *SignerV2) GetExtraParam() map[string]string

GetExtraParam returns params

func (*SignerV2) GetName

func (*SignerV2) GetName() string

GetName returns "SHA256withRSA"

func (*SignerV2) GetType

func (*SignerV2) GetType() string

GetType returns "PRIVATEKEY"

func (*SignerV2) GetVersion

func (*SignerV2) GetVersion() string

GetVersion returns "1.0"

func (*SignerV2) Shutdown

func (signer *SignerV2) Shutdown()

Shutdown doesn't implement

func (*SignerV2) Sign

func (signer *SignerV2) Sign(stringToSign, secretSuffix string) string

Sign create signer

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) GetType

func (*StsTokenSigner) GetType() string

GetType returns ""

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

Jump to

Keyboard shortcuts

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