...

Package credentials

import "github.com/aws/aws-sdk-go-v2/credentials"
Overview
Index
Subdirectories

Overview ▾

Package credentials provides types for retrieving credentials from credentials sources.

Constants

const (
    // StaticCredentialsName provides a name of Static provider
    StaticCredentialsName = "StaticCredentials"
)

type StaticCredentialsEmptyError

StaticCredentialsEmptyError is emitted when static credentials are empty.

type StaticCredentialsEmptyError struct{}

func (*StaticCredentialsEmptyError) Error

func (*StaticCredentialsEmptyError) Error() string

type StaticCredentialsProvider

A StaticCredentialsProvider is a set of credentials which are set, and will never expire.

type StaticCredentialsProvider struct {
    Value aws.Credentials
}

func NewStaticCredentialsProvider

func NewStaticCredentialsProvider(key, secret, session string) StaticCredentialsProvider

NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the AWS credentials passed in.

func (StaticCredentialsProvider) Retrieve

func (s StaticCredentialsProvider) Retrieve(_ context.Context) (aws.Credentials, error)

Retrieve returns the credentials or error if the credentials are invalid.

Subdirectories

Name Synopsis
..
ec2rolecreds Package ec2rolecreds provides the credentials provider implementation for retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS.
endpointcreds Package endpointcreds provides support for retrieving credentials from an arbitrary HTTP endpoint.
processcreds Package processcreds is a credentials provider to retrieve credentials from a external CLI invoked process.
ssocreds Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token.
stscreds Package stscreds are credential Providers to retrieve STS AWS credentials.