credentials

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcsRamRole

func EcsRamRole(ramRole string) func(*EcsRoleCredentialsProviderOptions)

Types

type AnonymousCredentialsProvider

type AnonymousCredentialsProvider struct{}

func (*AnonymousCredentialsProvider) GetCredentials

type Credentials

type Credentials struct {
	AccessKeyID     string     // Access key ID
	AccessKeySecret string     // Access Key Secret
	SecurityToken   string     // Security Token
	Expires         *time.Time // The time the credentials will expire at.
}

func (Credentials) Expired

func (v Credentials) Expired() bool

func (Credentials) HasKeys

func (v Credentials) HasKeys() bool

type CredentialsFetcher

type CredentialsFetcher interface {
	Fetch(ctx context.Context) (Credentials, error)
}

type CredentialsFetcherFunc

type CredentialsFetcherFunc func(context.Context) (Credentials, error)

CredentialsFetcherFunc provides a helper wrapping a function value to satisfy the CredentialsFetcher interface.

func (CredentialsFetcherFunc) Fetch

Fetch delegates to the function value the CredentialsFetcherFunc wraps.

type CredentialsFetcherOptions

type CredentialsFetcherOptions struct {
	ExpiredFactor   float64
	RefreshDuration time.Duration
}

CredentialsFetcherOptions are the options

type CredentialsFetcherProvider

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

func (*CredentialsFetcherProvider) GetCredentials

func (c *CredentialsFetcherProvider) GetCredentials(ctx context.Context) (Credentials, error)

type CredentialsProvider

type CredentialsProvider interface {
	GetCredentials(ctx context.Context) (Credentials, error)
}

func NewAnonymousCredentialsProvider

func NewAnonymousCredentialsProvider() CredentialsProvider

func NewCredentialsFetcherProvider

func NewCredentialsFetcherProvider(fetcher CredentialsFetcher, optFns ...func(*CredentialsFetcherOptions)) CredentialsProvider

func NewEcsRoleCredentialsProvider

func NewEcsRoleCredentialsProvider(optFns ...func(*EcsRoleCredentialsProviderOptions)) CredentialsProvider

func NewEcsRoleCredentialsProviderWithoutRefresh

func NewEcsRoleCredentialsProviderWithoutRefresh(optFns ...func(*EcsRoleCredentialsProviderOptions)) CredentialsProvider

func NewEnvironmentVariableCredentialsProvider

func NewEnvironmentVariableCredentialsProvider() CredentialsProvider

func NewProcessCredentialsProvider

func NewProcessCredentialsProvider(command string, optFns ...func(*ProcessCredentialsProviderOptions)) CredentialsProvider

func NewStaticCredentialsProvider

func NewStaticCredentialsProvider(id, secret string, tokens ...string) CredentialsProvider

type CredentialsProviderFunc

type CredentialsProviderFunc func(context.Context) (Credentials, error)

CredentialsProviderFunc provides a helper wrapping a function value to satisfy the CredentialsProvider interface.

func (CredentialsProviderFunc) GetCredentials

func (fn CredentialsProviderFunc) GetCredentials(ctx context.Context) (Credentials, error)

GetCredentials delegates to the function value the CredentialsProviderFunc wraps.

type EcsRoleCredentialsProviderOptions

type EcsRoleCredentialsProviderOptions struct {
	RamRole string
	Timeout time.Duration
	Retries int
}

type EnvironmentVariableCredentialsProvider

type EnvironmentVariableCredentialsProvider struct {
}

func (*EnvironmentVariableCredentialsProvider) GetCredentials

type ProcessCredentialsProvider

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

func (*ProcessCredentialsProvider) GetCredentials

func (p *ProcessCredentialsProvider) GetCredentials(ctx context.Context) (Credentials, error)

type ProcessCredentialsProviderOptions

type ProcessCredentialsProviderOptions struct {
	Timeout time.Duration
}

type StaticCredentialsProvider

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

func (StaticCredentialsProvider) GetCredentials

Jump to

Keyboard shortcuts

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