object

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() app.Module

Types

type Store

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

func NewStore

func NewStore(cfg *StoreConfig) (*Store, error)

func (*Store) OnStart

func (s *Store) OnStart(context.Context) error

func (*Store) OnStop

func (s *Store) OnStop(context.Context) error

func (*Store) PreSignedDownload

func (s *Store) PreSignedDownload(ctx context.Context, uri url.URL, expires time.Duration) (
	*url.URL,
	error,
)

func (*Store) Upload

func (s *Store) Upload(ctx context.Context, bucketName, path string, data io.Reader, objectSize int64) (
	*UploadedObject,
	error,
)

type StoreConfig

type StoreConfig struct {
	Endpoint  string
	AccessKey string
	SecretKey string
	UseSSL    bool
}

type UploadedObject

type UploadedObject struct {
	Uri            *url.URL
	ChecksumSHA256 string
	UploadedSize   int64
}

Jump to

Keyboard shortcuts

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