s3

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignatureV2 = "v2"
	SignatureV4 = "v4"
)

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(config *Config) (*Client, error)

func (*Client) PutObject

func (c *Client) PutObject(ctx context.Context, bucket, key string, reader io.Reader, size int64) error

func (*Client) PutObjectBytes

func (c *Client) PutObjectBytes(ctx context.Context, bucket, key string, data []byte) error

func (*Client) PutObjectString

func (c *Client) PutObjectString(ctx context.Context, bucket, key string, data string) error

func (*Client) RemoveObject

func (c *Client) RemoveObject(ctx context.Context, bucket, key string) error

type Config

type Config struct {
	Endpoint         string
	AccessKey        string
	SecretKey        string
	SignatureVersion string // 默认值 "v4"
	UsePathStyle     bool
	Region           string
	SkipTlsVerify    bool
}

Jump to

Keyboard shortcuts

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