store

package
v0.1.6-test Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAzureInvalidURL  = errors.New("invalid Azure storage URL")
	ErrAzureCredentials = errors.New("azure credentials error")
)
View Source
var (
	ErrNoStorageAdapter = errors.New("no storage adapter found")
)

Functions

func GetAzureClient

func GetAzureClient() (pipeline.Pipeline, error)

func GetGCSClient

func GetGCSClient(ctx context.Context) (*storage.Client, error)

func GetS3Client

func GetS3Client() (*s3.S3, error)

func Walk

func Walk(ctx context.Context, storageURI string, walkFn func(e ObjectStoreEntry) error) error

Types

type AzureBlobWalker

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

func (*AzureBlobWalker) Walk

func (a *AzureBlobWalker) Walk(ctx context.Context, storageURI *url.URL, walkFn func(e ObjectStoreEntry) error) error

type GCSWalker

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

func (*GCSWalker) Walk

func (w *GCSWalker) Walk(ctx context.Context, storageURI *url.URL, walkFn func(e ObjectStoreEntry) error) error

type ObjectStoreEntry

type ObjectStoreEntry struct {
	// FullKey represents the fully qualified path in the object store namespace for the given entry
	FullKey string
	// RelativeKey represents a path relative to prefix (or directory). If none specified, will be identical to FullKey
	RelativeKey string
	// Address is a full URI for the entry, including the storage namespace (i.e. s3://bucket/path/to/key)
	Address string
	// ETag represents a hash of the entry's content. Generally as hex encoded MD5,
	// but depends on the underlying object store
	ETag string
	// Mtime is the last-modified datetime of the entry
	Mtime time.Time
	// Size in bytes
	Size int64
}

func (ObjectStoreEntry) String

func (e ObjectStoreEntry) String() string

type S3Walker

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

func (*S3Walker) Walk

func (s *S3Walker) Walk(ctx context.Context, storageURI *url.URL, walkFn func(e ObjectStoreEntry) error) error

type Walker

type Walker interface {
	Walk(ctx context.Context, storageURI *url.URL, walkFn func(e ObjectStoreEntry) error) error
}

Jump to

Keyboard shortcuts

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