s3filestore

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PresignConfig

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

type PresignOption

type PresignOption func(*PresignConfig)

func SetCacheDuration

func SetCacheDuration(duration time.Duration) PresignOption

func SetDownloadOptions added in v1.1.1

func SetDownloadOptions(fileName string, contentType string) PresignOption

func SetExpirationDuration

func SetExpirationDuration(duration time.Duration) PresignOption

type S3FileStore

type S3FileStore struct {
	Client                           *s3.Client
	BucketName                       string
	DefaultObjectCacheDuration       *time.Duration
	DefaultPresignExpirationDuration time.Duration
}

func New

func New(bucketName string, region string) *S3FileStore

func (*S3FileStore) PresignedGetUrl

func (s *S3FileStore) PresignedGetUrl(key string, opts ...PresignOption) (string, error)

func (*S3FileStore) PresignedPutUrl

func (s *S3FileStore) PresignedPutUrl(
	key string,
	opts ...PresignOption,
) (string, error)

Jump to

Keyboard shortcuts

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