objectStorage

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	CopyObject(ctx context.Context, dst string, src string) error
	DeleteObject(ctx context.Context, key string) error
	DeletePrefix(ctx context.Context, prefix string) error
	GetObjectSize(ctx context.Context, key string) (int64, error)
	GetReadStream(ctx context.Context, key string) (int64, io.ReadSeekCloser, error)
	GetRedirectURLForGET(ctx context.Context, key string) (*url.URL, error)
	SendFromStream(ctx context.Context, key string, reader io.Reader, size int64) error
}

func FromOptions

func FromOptions(options Options) (Backend, error)

type Options

type Options struct {
	Bucket          string        `json:"bucket"`
	Provider        string        `json:"provider"`
	Endpoint        string        `json:"endpoint"`
	Region          string        `json:"region"`
	Secure          bool          `json:"secure"`
	Key             string        `json:"key"`
	Secret          string        `json:"secret"`
	SignedURLExpiry time.Duration `json:"signed_url_expiry_in_ns"`
}

func (Options) Validate

func (o Options) Validate() error

Jump to

Keyboard shortcuts

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