awsutil

package
v0.0.0-...-83768d2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalRegionID = "global"
)

Variables

View Source
var (
	// DefaultRegionID The default region. Can be customized for non AWS implementations
	DefaultRegionID = endpoints.UsEast1RegionID

	// DefaultAWSPartitionID The default aws partition. Can be customized for non AWS implementations
	DefaultAWSPartitionID = endpoints.AwsPartitionID
)
View Source
var (
	RESecretHeader = regexp.MustCompile(`(?m:^([^:]*(Auth|Security)[^:]*):.*$)`)
)

Functions

func DumpRequest

func DumpRequest(r *http.Request) string

func DumpResponse

func DumpResponse(r *http.Response) string

func HideSecureHeaders

func HideSecureHeaders(dump []byte) []byte

Types

type Account

type Account struct {
	Credentials
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(creds Credentials) (*Account, error)

func (*Account) Alias

func (a *Account) Alias() string

func (*Account) Aliases

func (a *Account) Aliases() []string

func (*Account) ID

func (a *Account) ID() string

func (*Account) ResourceTypeToServiceType

func (a *Account) ResourceTypeToServiceType(regionName, resourceType string) string

type Credentials

type Credentials struct {
	Profile string

	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	AssumeRoleArn   string

	Credentials *credentials.Credentials

	CustomEndpoints config.CustomEndpoints
	// contains filtered or unexported fields
}

func (*Credentials) HasAwsCredentials

func (c *Credentials) HasAwsCredentials() bool

func (*Credentials) HasKeys

func (c *Credentials) HasKeys() bool

func (*Credentials) HasProfile

func (c *Credentials) HasProfile() bool

func (*Credentials) NewSession

func (c *Credentials) NewSession(region, serviceType string) (*session.Session, error)

func (*Credentials) Validate

func (c *Credentials) Validate() error

type ErrSkipRequest

type ErrSkipRequest string

func (ErrSkipRequest) Error

func (err ErrSkipRequest) Error() string

type ErrUnknownEndpoint

type ErrUnknownEndpoint string

func (ErrUnknownEndpoint) Error

func (err ErrUnknownEndpoint) Error() string

Jump to

Keyboard shortcuts

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