awsutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 19 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
)
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, endpoints config.CustomEndpoints) (*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

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

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