storage

package
v0.0.0-...-d4ced42 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 13 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 {
	GetObject(ctx context.Context, path string) (*Object, error)
}

Backend is a generic interface for storage backends

func AzureBlob

func AzureBlob(client *msstorage.Client, bucket, prefix string) Backend

AzureBlob Backend object storage manager

func GCS

func GCS(client *storage.Client, bucket, prefix string) Backend

GCS Backend object storage manager

func S3

func S3(client s3iface.S3API, bucket, prefix string) Backend

S3 Backend object storage manager

type Object

type Object struct {
	Path         string
	Content      io.ReadCloser
	LastModified time.Time
}

Object is a generic representation of a storage object

func (*Object) HasExtension

func (object *Object) HasExtension(extension string) bool

HasExtension determines whether or not an object contains a file extension

Jump to

Keyboard shortcuts

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