sts

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sts implements a sidecred.Provider for AWS STS Credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client STSAPI, options ...option) sidecred.Provider

New returns a new sidecred.Provider for STS Credentials.

func WithExternalID

func WithExternalID(id string) option

WithExternalID sets the external ID used to assume roles.

func WithSessionDuration

func WithSessionDuration(duration time.Duration) option

WithSessionDuration overrides the default session duration.

Types

type RequestConfig

type RequestConfig struct {
	RoleARN  string `json:"role_arn"`
	Duration int64  `json:"duration"`
}

RequestConfig ...

type STSAPI

type STSAPI interface {
	AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
}

STSAPI wraps the interface for the API and provides a mocked implementation.

func NewClient

func NewClient(sess *session.Session) STSAPI

NewClient returns a new client for STSAPI.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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