credentials

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AwsCredentialsStringFormat format strings for printing AWS credentials as a string or as environment variables
	AwsCredentialsStringFormat = `Temporary Credentials:
  AccessKeyID: %s
  SecretAccessKey: %s
  SessionToken: %s
  Region: %s
  Expires: %s`
	AwsExportFormat = `export AWS_ACCESS_KEY_ID=%s
export AWS_SECRET_ACCESS_KEY=%s
export AWS_SESSION_TOKEN=%s
export AWS_DEFAULT_REGION=%s`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCredentialsResponse

type AWSCredentialsResponse struct {
	AccessKeyID     string `json:"AccessKeyID" yaml:"AccessKeyID"`
	SecretAccessKey string `json:"SecretAccessKey" yaml:"SecretAccessKey"`
	SessionToken    string `json:"SessionToken" yaml:"SessionToken"`
	Region          string `json:"Region" yaml:"Region"`
	Expiration      string `json:"Expiration" yaml:"Expiration"`
}

func (*AWSCredentialsResponse) AWSV2Config added in v0.1.18

func (r *AWSCredentialsResponse) AWSV2Config() (aws.Config, error)

AWSV2Config returns an aws-sdk-go-v2 config that can be used to programmatically access the AWS API

func (*AWSCredentialsResponse) FmtExport

func (r *AWSCredentialsResponse) FmtExport() string

func (*AWSCredentialsResponse) String

func (r *AWSCredentialsResponse) String() string

type GCPCredentialsResponse

type GCPCredentialsResponse struct {
	ProjectID string `json:"project_id" yaml:"project_id"`
}

func (*GCPCredentialsResponse) FmtExport

func (r *GCPCredentialsResponse) FmtExport() string

func (*GCPCredentialsResponse) String

func (r *GCPCredentialsResponse) String() string

type Response

type Response interface {
	// String returns a friendly message outlining how users can setup cloud environment access
	String() string

	// FmtExport sets environment variables for users to export to setup cloud environment access
	FmtExport() string
}

Jump to

Keyboard shortcuts

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