awsblob

package
v0.0.0-...-b1f9b26 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package awsblob provides the blob operations needed by Logseq Sync, backed by AWS's S3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(bkt, region, roleARN string) (*Client, error)

func (*Client) Bucket

func (c *Client) Bucket() string

func (*Client) GenerateTempCreds

func (c *Client) GenerateTempCreds(ctx context.Context, prefix string) (*blob.Credentials, error)

func (*Client) Move

func (c *Client) Move(ctx context.Context, srcPath, destPath string) (*blob.MoveMeta, error)

S3 doesn't have a 'move' operation, so we just do copy and delete. See https://stackoverflow.com/q/63061426

func (*Client) SignedDownloadURL

func (c *Client) SignedDownloadURL(ctx context.Context, key string, dur time.Duration) (string, error)

Jump to

Keyboard shortcuts

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