awstestutil

package
v0.0.0-...-e2c53ed Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package awsutil provides support for testing AWS packages and applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSTestMain

func AWSTestMain(m *testing.M, service **AWS, opts ...Option)

func DefaultAWSConfig

func DefaultAWSConfig() aws.Config

func SkipAWSTests

func SkipAWSTests(_ *testing.T)

Types

type AWS

type AWS struct {
	// contains filtered or unexported fields
}

func NewLocalAWS

func NewLocalAWS(opts ...Option) *AWS

func (*AWS) S3

func (a *AWS) S3(cfg aws.Config) *s3.Client

func (*AWS) SecretsManager

func (a *AWS) SecretsManager(cfg aws.Config) *secretsmanager.Client

func (*AWS) Start

func (a *AWS) Start() error

func (*AWS) Stop

func (a *AWS) Stop() error

type Option

type Option func(o *Options)

func WithDebug

func WithDebug(log io.Writer) Option

func WithS3

func WithS3() Option

func WithS3Tree

func WithS3Tree(dir string) Option

WithS3Tree configures the local S3 instance with the contents of the specified directory. The first level of directories under dir are used as bucket names, the second and deeper levels as prefixes and objects within those buckets etc.

func WithSecretsManager

func WithSecretsManager() Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type Service

type Service string
const (
	S3             Service = Service(localstack.S3)
	SecretsManager Service = Service(localstack.SecretsManager)
)

Jump to

Keyboard shortcuts

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