assumerolewithcreds

package
v2.0.0-rc1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinAssumeRoleDuration     = time.Minute * 15
	MaxAssumeRoleDuration     = time.Hour * 12
	DefaultAssumeRoleDuration = time.Minute * 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleWithCreds

type AssumeRoleWithCreds struct {
	BaseRoleCreds awsokta.AWSCreds
	TargetRoleARN string

	// Opts must have had ApplyDefaults and Validate called
	Opts Opts
}

func (AssumeRoleWithCreds) Assume

func (a AssumeRoleWithCreds) Assume() (Creds, error)

TODO: needs testing

type Creds

type Creds struct {
	CredsMeta
	awsokta.AWSCreds
}

type CredsMeta

type CredsMeta struct {
}

type ErrAssumeRoleDurationOOB

type ErrAssumeRoleDurationOOB struct {
	Min    time.Duration
	Max    time.Duration
	Actual time.Duration
}

func (*ErrAssumeRoleDurationOOB) Error

func (e *ErrAssumeRoleDurationOOB) Error() string

type Opts

type Opts struct {
	AssumeRoleDuration time.Duration

	// if unset, no session caching will be done
	SessionCache SessionCache

	Log *logrus.Logger

	RoleSessionName string
}

func (*Opts) ApplyDefaults

func (o *Opts) ApplyDefaults() *Opts

func (*Opts) Validate

func (o *Opts) Validate() error

type SessionCache

type SessionCache interface {
	Get(sessionCacheKey) (Creds, error)
	Put(sessionCacheKey, Creds) error
}

Jump to

Keyboard shortcuts

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