providers

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectStore

type ObjectStore struct {
	ProviderObjectStore
}

func (*ObjectStore) CreateSignedURL

func (o *ObjectStore) CreateSignedURL(bucket, key string, ttl time.Duration) (string, error)

CreateSignedURL gives back a signed URL for the object that expires after the given ttl

func (*ObjectStore) Init

func (o *ObjectStore) Init(config map[string]string) error

This actually does nothing in this implementation

func (*ObjectStore) ListCommonPrefixes

func (o *ObjectStore) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error)

ListCommonPrefixes gets a list of all object key prefixes that come before the provided delimiter

func (*ObjectStore) ListObjects

func (o *ObjectStore) ListObjects(bucket, prefix string) ([]string, error)

ListObjects gets all keys with the given prefix from the bucket

func (*ObjectStore) ObjectExists

func (o *ObjectStore) ObjectExists(bucket, key string) (bool, error)

ObjectExists checks if there is an object with the given key in the object storage bucket.

type ProviderObjectStore

type ProviderObjectStore interface {
	objectstore.ObjectStore

	// ListObjectKeyPrefixes gets a list of all object key prefixes that come before the provided delimiter and
	// starts with a specified prefix.
	ListObjectKeyPrefixesStartingWithPrefix(bucketName string, prefix string, delimeter string) ([]string, error)
}

ProviderObjectStore is the interface that cloud specific object store implementation must implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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