adapt

package
v0.0.0-...-e204074 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: AGPL-3.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsS3NotFound

func IsS3NotFound(err error) bool

func S3Get

func S3Get(ctx context.Context, s3c S3Getter, bucket, key string, fn func(r io.Reader) error) error

func S3GetJson

func S3GetJson(ctx context.Context, s3c S3Getter, bucket, key string, v any) error

func S3GetJsonWithLastModified

func S3GetJsonWithLastModified(ctx context.Context, s3c S3Getter, bucket, key string, v any) (time.Time, error)

func S3GetRaw

func S3GetRaw(ctx context.Context, s3c S3Getter, bucket, key string) ([]byte, error)

func S3GetWithLastModified

func S3GetWithLastModified(ctx context.Context, s3c S3Getter, bucket, key string, fn func(r io.Reader) error) (time.Time, error)

func S3PutJson

func S3PutJson(ctx context.Context, s3c S3Putter, bucket, key string, v any) error

func S3PutRaw

func S3PutRaw(ctx context.Context, s3c S3Putter, bucket, key string, b []byte) error

Types

type S3Getter

type S3Getter interface {
	GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}

type S3Lister

type S3Lister interface {
	ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
}

type S3Putter

type S3Putter interface {
	PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳