credentials

package
v1.63.75 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 252

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeyCredential

type AccessKeyCredential struct {
	AccessKeyId     string
	AccessKeySecret string
}

func NewAccessKeyCredential

func NewAccessKeyCredential(accessKeyId, accessKeySecret string) *AccessKeyCredential

type BaseCredential deprecated

type BaseCredential struct {
	AccessKeyId     string
	AccessKeySecret string
}

Deprecated: Use AccessKeyCredential in this package instead.

func NewBaseCredential deprecated

func NewBaseCredential(accessKeyId, accessKeySecret string) *BaseCredential

Deprecated: Use NewAccessKeyCredential in this package instead.

func (*BaseCredential) ToAccessKeyCredential

func (baseCred *BaseCredential) ToAccessKeyCredential() *AccessKeyCredential

type BearerTokenCredential

type BearerTokenCredential struct {
	BearerToken string
}

func NewBearerTokenCredential

func NewBearerTokenCredential(token string) *BearerTokenCredential

NewBearerTokenCredential return a BearerTokenCredential object

type BearerTokenCredentialsProvider added in v1.62.809

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

func NewBearerTokenCredentialsProvider added in v1.62.809

func NewBearerTokenCredentialsProvider(bearerToken string) *BearerTokenCredentialsProvider

func (*BearerTokenCredentialsProvider) GetCredentials added in v1.62.809

func (provider *BearerTokenCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*BearerTokenCredentialsProvider) GetProviderName added in v1.63.5

func (provider *BearerTokenCredentialsProvider) GetProviderName() string

type CLIProfileCredentialsProvider added in v1.63.1

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

func (*CLIProfileCredentialsProvider) GetCredentials added in v1.63.1

func (provider *CLIProfileCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*CLIProfileCredentialsProvider) GetProviderName added in v1.63.5

func (provider *CLIProfileCredentialsProvider) GetProviderName() string

type CLIProfileCredentialsProviderBuilder added in v1.63.1

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

func NewCLIProfileCredentialsProviderBuilder added in v1.63.1

func NewCLIProfileCredentialsProviderBuilder() *CLIProfileCredentialsProviderBuilder

func (*CLIProfileCredentialsProviderBuilder) Build added in v1.63.1

func (*CLIProfileCredentialsProviderBuilder) WithProfileName added in v1.63.1

type Credentials added in v1.62.809

type Credentials struct {
	AccessKeyId     string
	AccessKeySecret string
	SecurityToken   string
	BearerToken     string
	ProviderName    string
}

type CredentialsProvider added in v1.62.809

type CredentialsProvider interface {
	GetCredentials() (cc *Credentials, err error)
	GetProviderName() string
}

type DefaultCredentialsProvider added in v1.63.1

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

func NewDefaultCredentialsProvider added in v1.63.1

func NewDefaultCredentialsProvider() (provider *DefaultCredentialsProvider)

func (*DefaultCredentialsProvider) GetCredentials added in v1.63.1

func (provider *DefaultCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*DefaultCredentialsProvider) GetProviderName added in v1.63.5

func (provider *DefaultCredentialsProvider) GetProviderName() string

type ECSRAMRoleCredentialsProvider added in v1.62.809

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

func NewECSRAMRoleCredentialsProvider added in v1.62.809

func NewECSRAMRoleCredentialsProvider(roleName string) *ECSRAMRoleCredentialsProvider

func (*ECSRAMRoleCredentialsProvider) GetCredentials added in v1.62.809

func (provider *ECSRAMRoleCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*ECSRAMRoleCredentialsProvider) GetProviderName added in v1.63.5

func (provider *ECSRAMRoleCredentialsProvider) GetProviderName() string

type ECSRAMRoleCredentialsProviderBuilder added in v1.63.49

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

func NewECSRAMRoleCredentialsProviderBuilder added in v1.63.49

func NewECSRAMRoleCredentialsProviderBuilder() *ECSRAMRoleCredentialsProviderBuilder

func (*ECSRAMRoleCredentialsProviderBuilder) Build added in v1.63.49

func (*ECSRAMRoleCredentialsProviderBuilder) WithDisableIMDSv1 added in v1.63.49

func (builder *ECSRAMRoleCredentialsProviderBuilder) WithDisableIMDSv1(disableIMDSv1 bool) *ECSRAMRoleCredentialsProviderBuilder

func (*ECSRAMRoleCredentialsProviderBuilder) WithHttpOptions added in v1.63.49

func (*ECSRAMRoleCredentialsProviderBuilder) WithRoleName added in v1.63.49

type EcsRamRoleCredential

type EcsRamRoleCredential struct {
	RoleName string
}

func NewEcsRamRoleCredential

func NewEcsRamRoleCredential(roleName string) *EcsRamRoleCredential

type EnvironmentVariableCredentialsProvider added in v1.63.1

type EnvironmentVariableCredentialsProvider struct {
}

func NewEnvironmentVariableCredentialsProvider added in v1.63.1

func NewEnvironmentVariableCredentialsProvider() (provider *EnvironmentVariableCredentialsProvider)

func (*EnvironmentVariableCredentialsProvider) GetCredentials added in v1.63.1

func (provider *EnvironmentVariableCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*EnvironmentVariableCredentialsProvider) GetProviderName added in v1.63.5

func (provider *EnvironmentVariableCredentialsProvider) GetProviderName() string

type HttpOptions added in v1.63.49

type HttpOptions struct {
	// Connection timeout
	ConnectTimeout time.Duration
	// Read timeout
	ReadTimeout time.Duration
}

type OIDCCredentialsProvider added in v1.62.809

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

func (*OIDCCredentialsProvider) GetCredentials added in v1.62.809

func (provider *OIDCCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*OIDCCredentialsProvider) GetProviderName added in v1.63.5

func (provider *OIDCCredentialsProvider) GetProviderName() string

type OIDCCredentialsProviderBuilder added in v1.62.809

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

func NewOIDCCredentialsProviderBuilder added in v1.62.809

func NewOIDCCredentialsProviderBuilder() *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) Build added in v1.62.809

func (b *OIDCCredentialsProviderBuilder) Build() (provider *OIDCCredentialsProvider, err error)

func (*OIDCCredentialsProviderBuilder) WithDurationSeconds added in v1.62.809

func (b *OIDCCredentialsProviderBuilder) WithDurationSeconds(durationSeconds int) *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) WithEnableVpc added in v1.63.49

func (*OIDCCredentialsProviderBuilder) WithHttpOptions added in v1.63.49

func (*OIDCCredentialsProviderBuilder) WithOIDCProviderARN added in v1.62.809

func (b *OIDCCredentialsProviderBuilder) WithOIDCProviderARN(oidcProviderArn string) *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) WithOIDCTokenFilePath added in v1.62.809

func (b *OIDCCredentialsProviderBuilder) WithOIDCTokenFilePath(oidcTokenFilePath string) *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) WithPolicy added in v1.62.809

func (*OIDCCredentialsProviderBuilder) WithRoleArn added in v1.62.809

func (*OIDCCredentialsProviderBuilder) WithRoleSessionName added in v1.62.809

func (b *OIDCCredentialsProviderBuilder) WithRoleSessionName(roleSessionName string) *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) WithSTSEndpoint added in v1.63.49

func (b *OIDCCredentialsProviderBuilder) WithSTSEndpoint(stsEndpoint string) *OIDCCredentialsProviderBuilder

func (*OIDCCredentialsProviderBuilder) WithStsRegion added in v1.62.809

type ProfileCredentialsProvider added in v1.63.1

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

func (*ProfileCredentialsProvider) GetCredentials added in v1.63.1

func (provider *ProfileCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (ProfileCredentialsProvider) GetProviderName added in v1.63.5

func (provider ProfileCredentialsProvider) GetProviderName() string

type ProfileCredentialsProviderBuilder added in v1.63.1

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

func NewProfileCredentialsProviderBuilder added in v1.63.1

func NewProfileCredentialsProviderBuilder() (builder *ProfileCredentialsProviderBuilder)

func (*ProfileCredentialsProviderBuilder) Build added in v1.63.1

func (*ProfileCredentialsProviderBuilder) WithProfileName added in v1.63.1

type RAMRoleARNCredentialsProvider added in v1.62.809

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

func NewRAMRoleARNCredentialsProvider added in v1.62.809

func NewRAMRoleARNCredentialsProvider(credentialsProvider CredentialsProvider, roleArn, roleSessionName string, durationSeconds int, policy, stsRegion, externalId string) (provider *RAMRoleARNCredentialsProvider, err error)

func (*RAMRoleARNCredentialsProvider) GetCredentials added in v1.62.809

func (provider *RAMRoleARNCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*RAMRoleARNCredentialsProvider) GetProviderName added in v1.63.5

func (provider *RAMRoleARNCredentialsProvider) GetProviderName() string

type RAMRoleARNCredentialsProviderBuilder added in v1.63.49

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

func NewRAMRoleARNCredentialsProviderBuilder added in v1.63.49

func NewRAMRoleARNCredentialsProviderBuilder() *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) Build added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithAccessKeyId added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithAccessKeySecret added in v1.63.49

func (builder *RAMRoleARNCredentialsProviderBuilder) WithAccessKeySecret(accessKeySecret string) *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) WithCredentialsProvider added in v1.63.49

func (builder *RAMRoleARNCredentialsProviderBuilder) WithCredentialsProvider(credentialsProvider CredentialsProvider) *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) WithDurationSeconds added in v1.63.49

func (builder *RAMRoleARNCredentialsProviderBuilder) WithDurationSeconds(durationSeconds int) *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) WithEnableVpc added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithExternalId added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithHttpOptions added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithPolicy added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithRoleArn added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithRoleSessionName added in v1.63.49

func (builder *RAMRoleARNCredentialsProviderBuilder) WithRoleSessionName(roleSessionName string) *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) WithSecurityToken added in v1.63.49

func (builder *RAMRoleARNCredentialsProviderBuilder) WithSecurityToken(securityToken string) *RAMRoleARNCredentialsProviderBuilder

func (*RAMRoleARNCredentialsProviderBuilder) WithStsEndpoint added in v1.63.49

func (*RAMRoleARNCredentialsProviderBuilder) WithStsRegion added in v1.63.49

type RSAKeyPairCredentialsProvider deprecated added in v1.62.809

type RSAKeyPairCredentialsProvider struct {
	PublicKeyId  string
	PrivateKeyId string
	// contains filtered or unexported fields
}

Deprecated: the RSA key pair credentials is deprecated

func NewRSAKeyPairCredentialsProvider deprecated added in v1.62.809

func NewRSAKeyPairCredentialsProvider(publicKeyId, privateKeyId string, durationSeconds int) (provider *RSAKeyPairCredentialsProvider, err error)

Deprecated: the RSA key pair credentials is deprecated

func (*RSAKeyPairCredentialsProvider) GetCredentials deprecated added in v1.62.809

func (provider *RSAKeyPairCredentialsProvider) GetCredentials() (cc *Credentials, err error)

Deprecated: the RSA key pair credentials is deprecated

func (*RSAKeyPairCredentialsProvider) GetProviderName added in v1.63.5

func (provider *RSAKeyPairCredentialsProvider) GetProviderName() string

type RamRoleArnCredential

type RamRoleArnCredential struct {
	AccessKeyId           string
	AccessKeySecret       string
	RoleArn               string
	RoleSessionName       string
	RoleSessionExpiration int
	Policy                string
	StsRegion             string
	ExternalId            string
}

func NewRamRoleArnCredential

func NewRamRoleArnCredential(accessKeyId, accessKeySecret, roleArn, roleSessionName string, roleSessionExpiration int) *RamRoleArnCredential

func NewRamRoleArnWithPolicyAndExternalIdCredential added in v1.62.362

func NewRamRoleArnWithPolicyAndExternalIdCredential(accessKeyId, accessKeySecret, roleArn, roleSessionName, policy, externalId string, roleSessionExpiration int) *RamRoleArnCredential

func NewRamRoleArnWithPolicyCredential

func NewRamRoleArnWithPolicyCredential(accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string, roleSessionExpiration int) *RamRoleArnCredential

type RsaKeyPairCredential deprecated

type RsaKeyPairCredential struct {
	PrivateKey        string
	PublicKeyId       string
	SessionExpiration int
}

Deprecated: the RSA key pair is deprecated

func NewRsaKeyPairCredential deprecated

func NewRsaKeyPairCredential(privateKey, publicKeyId string, sessionExpiration int) *RsaKeyPairCredential

Deprecated: the RSA key pair is deprecated

type SessionCredentials added in v1.62.809

type SessionCredentials struct {
	AccessKeyId     string
	AccessKeySecret string
	SecurityToken   string
	Expiration      string
}

type StaticAKCredentialsProvider added in v1.62.809

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

func NewStaticAKCredentialsProvider added in v1.62.809

func NewStaticAKCredentialsProvider(accessKeyId, accessKeySecret string) *StaticAKCredentialsProvider

func (*StaticAKCredentialsProvider) GetCredentials added in v1.62.809

func (provider *StaticAKCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*StaticAKCredentialsProvider) GetProviderName added in v1.63.5

func (provider *StaticAKCredentialsProvider) GetProviderName() string

type StaticAKCredentialsProviderBuilder added in v1.63.49

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

func NewStaticAKCredentialsProviderBuilder added in v1.63.49

func NewStaticAKCredentialsProviderBuilder() *StaticAKCredentialsProviderBuilder

func (*StaticAKCredentialsProviderBuilder) Build added in v1.63.49

func (builder *StaticAKCredentialsProviderBuilder) Build() (provider *StaticAKCredentialsProvider, err error)

func (*StaticAKCredentialsProviderBuilder) WithAccessKeyId added in v1.63.49

func (builder *StaticAKCredentialsProviderBuilder) WithAccessKeyId(accessKeyId string) *StaticAKCredentialsProviderBuilder

func (*StaticAKCredentialsProviderBuilder) WithAccessKeySecret added in v1.63.49

func (builder *StaticAKCredentialsProviderBuilder) WithAccessKeySecret(accessKeySecret string) *StaticAKCredentialsProviderBuilder

type StaticSTSCredentialsProvider added in v1.62.809

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

func NewStaticSTSCredentialsProvider added in v1.62.809

func NewStaticSTSCredentialsProvider(accessKeyId, accessKeySecret, securityToken string) *StaticSTSCredentialsProvider

func (*StaticSTSCredentialsProvider) GetCredentials added in v1.62.809

func (provider *StaticSTSCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*StaticSTSCredentialsProvider) GetProviderName added in v1.63.5

func (provider *StaticSTSCredentialsProvider) GetProviderName() string

type StaticSTSCredentialsProviderBuilder added in v1.63.49

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

func NewStaticSTSCredentialsProviderBuilder added in v1.63.49

func NewStaticSTSCredentialsProviderBuilder() *StaticSTSCredentialsProviderBuilder

func (*StaticSTSCredentialsProviderBuilder) Build added in v1.63.49

func (*StaticSTSCredentialsProviderBuilder) WithAccessKeyId added in v1.63.49

func (*StaticSTSCredentialsProviderBuilder) WithAccessKeySecret added in v1.63.49

func (builder *StaticSTSCredentialsProviderBuilder) WithAccessKeySecret(accessKeySecret string) *StaticSTSCredentialsProviderBuilder

func (*StaticSTSCredentialsProviderBuilder) WithSecurityToken added in v1.63.49

func (builder *StaticSTSCredentialsProviderBuilder) WithSecurityToken(securityToken string) *StaticSTSCredentialsProviderBuilder

type StsRoleArnCredential deprecated

type StsRoleArnCredential struct {
	AccessKeyId           string
	AccessKeySecret       string
	RoleArn               string
	RoleSessionName       string
	RoleSessionExpiration int
}

Deprecated: Use RamRoleArnCredential in this package instead.

func NewStsRoleArnCredential deprecated

func NewStsRoleArnCredential(accessKeyId, accessKeySecret, roleArn, roleSessionName string, roleSessionExpiration int) *StsRoleArnCredential

Deprecated: Use RamRoleArnCredential in this package instead.

func (*StsRoleArnCredential) ToRamRoleArnCredential

func (oldCred *StsRoleArnCredential) ToRamRoleArnCredential() *RamRoleArnCredential

type StsRoleNameOnEcsCredential deprecated

type StsRoleNameOnEcsCredential struct {
	RoleName string
}

Deprecated: Use EcsRamRoleCredential in this package instead.

func NewStsRoleNameOnEcsCredential deprecated

func NewStsRoleNameOnEcsCredential(roleName string) *StsRoleNameOnEcsCredential

Deprecated: Use NewEcsRamRoleCredential in this package instead.

func (*StsRoleNameOnEcsCredential) ToEcsRamRoleCredential

func (oldCred *StsRoleNameOnEcsCredential) ToEcsRamRoleCredential() *EcsRamRoleCredential

type StsTokenCredential

type StsTokenCredential struct {
	AccessKeyId       string
	AccessKeySecret   string
	AccessKeyStsToken string
}

func NewStsTokenCredential

func NewStsTokenCredential(accessKeyId, accessKeySecret, accessKeyStsToken string) *StsTokenCredential

type URLCredentialsProvider added in v1.63.49

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

func (*URLCredentialsProvider) GetCredentials added in v1.63.49

func (provider *URLCredentialsProvider) GetCredentials() (cc *Credentials, err error)

func (*URLCredentialsProvider) GetProviderName added in v1.63.49

func (provider *URLCredentialsProvider) GetProviderName() string

type URLCredentialsProviderBuilder added in v1.63.49

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

func NewURLCredentialsProviderBuilderBuilder added in v1.63.49

func NewURLCredentialsProviderBuilderBuilder() *URLCredentialsProviderBuilder

func (*URLCredentialsProviderBuilder) Build added in v1.63.49

func (builder *URLCredentialsProviderBuilder) Build() (provider *URLCredentialsProvider, err error)

func (*URLCredentialsProviderBuilder) WithHttpOptions added in v1.63.49

func (builder *URLCredentialsProviderBuilder) WithHttpOptions(httpOptions *HttpOptions) *URLCredentialsProviderBuilder

func (*URLCredentialsProviderBuilder) WithUrl added in v1.63.49

Directories

Path Synopsis
Package providers Deprecated
Package providers Deprecated

Jump to

Keyboard shortcuts

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