signedrequests

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DirDelim = "/"

DirDelim is the delimiter used to model a directory structure in an object store bucket.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	io.Closer
	SignedPUT(
		ctx context.Context,
		objectKey string,
		size int64,
		expiry time.Time,
	) (string, error)
	SignedGET(
		ctx context.Context,
		objectKey string,
		expiry time.Time,
	) (string, error)
}

func NewClient

func NewClient(ctx context.Context, bucketConf *client.BucketConfig) (Client, error)

func NewPrefixedClient

func NewPrefixedClient(client Client, prefix string) Client

type ErrUnsupportedProvider

type ErrUnsupportedProvider struct {
	Provider client.ObjProvider
}

func (ErrUnsupportedProvider) Error

func (e ErrUnsupportedProvider) Error() string

type GCSClient

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

func NewGCSBucketWithConfig

func NewGCSBucketWithConfig(ctx context.Context, gc gcs.Config) (*GCSClient, error)

func NewGCSClient

func NewGCSClient(ctx context.Context, conf []byte) (*GCSClient, error)

func (*GCSClient) Close

func (c *GCSClient) Close() error

func (*GCSClient) SignedGET

func (c *GCSClient) SignedGET(
	ctx context.Context,
	objectKey string,
	expiry time.Time,
) (string, error)

func (*GCSClient) SignedPUT

func (c *GCSClient) SignedPUT(
	ctx context.Context,
	objectKey string,
	size int64,
	expiry time.Time,
) (string, error)

type PrefixedClient

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

func (*PrefixedClient) Close

func (c *PrefixedClient) Close() error

func (*PrefixedClient) SignedGET

func (c *PrefixedClient) SignedGET(
	ctx context.Context,
	objectKey string,
	expiry time.Time,
) (string, error)

func (*PrefixedClient) SignedPUT

func (c *PrefixedClient) SignedPUT(
	ctx context.Context,
	objectKey string,
	size int64,
	expiry time.Time,
) (string, error)

Jump to

Keyboard shortcuts

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