s3

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

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 NewClient

func NewClient(ctx context.Context, v storage.ConfigProvider) (*Client, error)

func (Client) GetObject

func (c Client) GetObject(ctx context.Context, objectPath string) (*storage.ObjectReader, error)

func (Client) HeadObject

func (c Client) HeadObject(ctx context.Context, objectPath string) (obj *storage.Object, err error)

func (Client) ListObject

func (c Client) ListObject(ctx context.Context, objectPrefix string, recursion bool, callback func(key storage.Object)) error

func (Client) MarshalJSON

func (c Client) MarshalJSON() ([]byte, error)

func (Client) Name

func (c Client) Name() string

func (Client) Open added in v1.4.0

func (c Client) Open(name string) (fs.File, error)

func (Client) PutObject

func (c Client) PutObject(ctx context.Context, objectPath string, obj io.Reader, headers http2.Header, metadata map[string]string) error

func (Client) ReadDir added in v1.4.0

func (c Client) ReadDir(name string) ([]fs.DirEntry, error)

func (Client) Type

func (c Client) Type() string

type Options

type Options struct {
	Type            string      `json:"type,omitempty" yaml:"type,omitempty" mapstructure:"type"`
	Endpoint        string      `json:"endpoint,omitempty" yaml:"endpoint,omitempty" mapstructure:"endpoint"`
	AccessKeyId     string      `json:"access_key_id,omitempty" yaml:"access_key_id,omitempty" mapstructure:"access_key_id"`
	SecretAccessKey safe.String `json:"secret_access_key,omitempty" yaml:"secret_access_key,omitempty" mapstructure:"secret_access_key"`
	Bucket          string      `json:"bucket,omitempty" yaml:"bucket,omitempty" mapstructure:"bucket"`
	Region          string      `json:"region,omitempty" yaml:"region,omitempty" mapstructure:"region"`
	Worker          int         `json:"worker,omitempty" yaml:"worker,omitempty" mapstructure:"worker"`
}

Jump to

Keyboard shortcuts

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