aws

package
v1.4.5-0...-a368e71 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSTSClient

func GetSTSClient() (*sts.Client, error)

func STSAssumeRole

func STSAssumeRole(ctx context.Context, client STSApi, role string, session string) (string, error)

func STSGetCallerIdentity

func STSGetCallerIdentity(ctx context.Context, client STSApi) (sts.GetCallerIdentityOutput, error)

Types

type FakeSTSClient

type FakeSTSClient struct{}

func (FakeSTSClient) AssumeRole

func (f FakeSTSClient) AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)

func (FakeSTSClient) GetCallerIdentity

func (f FakeSTSClient) GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error)

type STSApi

type STSApi interface {
	AssumeRole(ctx context.Context,
		params *sts.AssumeRoleInput,
		optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
	GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error)
}

Jump to

Keyboard shortcuts

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