client

package
v0.0.284 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 23 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSDK added in v0.0.42

func NewSDK(c config.S3Cli) (*s3.S3, error)

func Sign

func Sign(req *request.Request)

Sign requests with signature version 2.

Will sign the requests with the service config's Credentials object Signing is skipped if the credentials is the credentials.AnonymousCredentials object.

Types

type S3Blobstore

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

S3Blobstore encapsulates interactions with an S3 compatible blobstore

func New

func New(s3Client *s3.S3, s3cliConfig *config.S3Cli) (S3Blobstore, error)

New returns a BlobstoreClient if the configuration file backing configFile is valid

func (*S3Blobstore) Delete

func (client *S3Blobstore) Delete(dest string) error

Delete removes a blob from an S3 compatible blobstore. If the object does not exist, Delete does not return an error.

func (*S3Blobstore) Exists

func (client *S3Blobstore) Exists(dest string) (bool, error)

Exists checks if blob exists in an S3 compatible blobstore

func (*S3Blobstore) Get

func (client *S3Blobstore) Get(src string, dest io.WriterAt) error

Get fetches a blob from an S3 compatible blobstore Destination will be overwritten if exists

func (*S3Blobstore) Put

func (client *S3Blobstore) Put(src io.ReadSeeker, dest string) error

Put uploads a blob to an S3 compatible blobstore

func (*S3Blobstore) Sign added in v0.0.82

func (client *S3Blobstore) Sign(objectID string, action string, expiration time.Duration) (string, error)

Sign presigns URLs for a S3 compatible blobstore

Jump to

Keyboard shortcuts

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