gsp

package
v0.0.0-...-a8c716a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GSP

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

func NewGSP

func NewGSP(addr, access, secret, regions string, ops ...OptionFunc) (*GSP, error)

NewGSP addr 确保地址包含HTTP前缀

func (*GSP) GetS3Object

func (g *GSP) GetS3Object(ctx context.Context, bucket, key string) ([]byte, error)

func (*GSP) GetS3ObjectWithWriter

func (g *GSP) GetS3ObjectWithWriter(ctx context.Context, bucket, key string, w io.WriterAt) error

func (*GSP) PutS3Object

func (g *GSP) PutS3Object(ctx context.Context, bucket, key, contentType string, data []byte) (string, error)

func (*GSP) PutS3ObjectWithReader

func (g *GSP) PutS3ObjectWithReader(ctx context.Context, bucket, key, contentType string, data io.Reader) (string, error)

type OptionFunc

type OptionFunc func(*GSP)

func WithLog

func WithLog(log *log.Logger) OptionFunc

Jump to

Keyboard shortcuts

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