storage

package
v0.0.0-...-53ad115 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetObjectOptions

type GetObjectOptions struct {
	Range *string
}

type PutObjectOptions

type PutObjectOptions struct {
	ContentType string
	Metadata    map[string]string
	HashSha256  []byte
}

type Storage

type Storage interface {
	BasePath() string
	CopyObject(ctx context.Context, from, to string) error
	DeleteObject(ctx context.Context, key string) error
	GetObject(ctx context.Context, key string, options *GetObjectOptions) (io.ReadCloser, error)
	GetObjectSize(ctx context.Context, key string) (int64, error)
	// GetPresignedUploadUrl(ctx context.Context, key string, size uint64) (string, error)
	PutObject(ctx context.Context, key string, size int64, object io.Reader, options *PutObjectOptions) error
	DeleteObjectsWithPrefix(ctx context.Context, prefix string) (err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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