storage

package
v0.0.0-...-f0c377f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Client        *s3.Client
	PresignClient *s3.PresignClient
	BucketName    string
}

func (*Service) GetUrl

func (svc *Service) GetUrl(ctx context.Context, fileKey string) (string, error)

func (*Service) Upload

func (svc *Service) Upload(ctx context.Context, fileKey string, fileData multipart.File) (string, error)

type StorageService

type StorageService interface {
	Upload(ctx context.Context, fileKey string, fileData multipart.File) (string, error)
	GetUrl(ctx context.Context, fileKey string) (string, error)
}

func NewService

func NewService(bucketName string, config aws.Config) StorageService

Jump to

Keyboard shortcuts

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