storage

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSS3Config

type AWSS3Config struct {
	Region          string
	BucketName      string
	AccessKeyID     string
	SecretAccessKey string
	PresignDuration time.Duration
}

type Config

type Config struct {
	AWSS3 AWSS3Config
}

type Interface

type Interface interface {
	Upload(ctx context.Context, key string, filename, filemimetype string, data []byte) (url string, err error)
	Download(ctx context.Context, url string) ([]byte, error)
	Delete(ctx context.Context, key string) error
	GetPresignedUrl(ctx context.Context, key string) (string, error)
	GetPresignedUrlWithDuration(ctx context.Context, key string, presignedDuration time.Duration) (string, error)
	CreateUrlByKey(key string) string
}

func Init

func Init(cfg Config, log logger.Interface) Interface

Jump to

Keyboard shortcuts

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