spaces

package
v1.3.20 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object not found")

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, opts Options) (*Client, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, logicalKey string) error

func (*Client) Head

func (c *Client) Head(ctx context.Context, logicalKey string) (*HeadResult, error)

func (*Client) PresignGet

func (c *Client) PresignGet(ctx context.Context, logicalKey string, ttl time.Duration) (string, error)

func (*Client) PresignPut

func (c *Client) PresignPut(
	ctx context.Context,
	logicalKey, contentType string,
	contentLength int64,
	ttl time.Duration,
) (string, error)

func (*Client) RangeGet

func (c *Client) RangeGet(ctx context.Context, logicalKey string, maxBytes int64) ([]byte, error)

type HeadResult

type HeadResult struct {
	ContentLength int64
	ContentType   string
}

type Options

type Options struct {
	Region    string
	Endpoint  string
	Bucket    string
	KeyPrefix string // empty, or ends with "/"
	AccessKey string
	SecretKey string
}

Jump to

Keyboard shortcuts

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