awss3v2

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 11 Imported by: 0

README

aws_s3_v2

s3://<bucket>/<prefix>

Documentation

Overview

The contents of this package are based on https://github.com/golang-migrate/migrate/tree/331a15d92a86e002ce5043e788cc2ca287ab0cc2/source/aws_s3 with the intention of hopefully proposing that it be added to golang-migrate/migrate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContext

func SetContext(ctx context.Context)

SetContext allows setting the context used internally since the golang-migrate/migrate/v4/source Driver interface does not require a context.Context argument while the inner aws-sdk-go-v2 functions do. No effort is made to lock writes to this internal context, so thread safety is very much punted.

func WithInstance

func WithInstance(s3client S3er, cfg *Config) (source.Driver, error)

Types

type Config

type Config struct {
	Bucket string
	Prefix string
}

type S3er

type S3er interface {
	ListObjectsV2(context.Context, *s3.ListObjectsV2Input, ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
	GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}

Jump to

Keyboard shortcuts

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