blobstore

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package blobstore provides a wrapper around S3 client.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileEmpty = errors.New("file is empty")
)

Functions

This section is empty.

Types

type FileMetaData

type FileMetaData struct {
	LastModified time.Time `json:"last_modified"`
	FileName     string    `json:"file_name"`
	SizeInBytes  uint64    `json:"size_in_bytes"`
}

type Store

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

func New

func New(endpoint string, region string, accessKeyId string, accessKeySecret string) (*Store, error)

func (*Store) GetList

func (s *Store) GetList(ctx context.Context, bucketName string, subDir string) ([]FileMetaData, error)

func (*Store) PresignDeleteObject

func (s *Store) PresignDeleteObject(ctx context.Context, bucketName string, fileName string) (*v4.PresignedHTTPRequest, error)

func (*Store) PresignGetObject

func (s *Store) PresignGetObject(ctx context.Context, bucketName string, fileName string) (*v4.PresignedHTTPRequest, error)

func (*Store) PresignPutObject

func (s *Store) PresignPutObject(ctx context.Context, bucketName string, fileName string, contentType string) (*v4.PresignedHTTPRequest, error)

Jump to

Keyboard shortcuts

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