Documentation ¶
Index ¶
- type GSP
- func (g *GSP) GetS3Object(ctx context.Context, bucket, key string) ([]byte, error)
- func (g *GSP) GetS3ObjectWithWriter(ctx context.Context, bucket, key string, w io.WriterAt) error
- func (g *GSP) PutS3Object(ctx context.Context, bucket, key, contentType string, data []byte) (string, error)
- func (g *GSP) PutS3ObjectWithReader(ctx context.Context, bucket, key, contentType string, data io.Reader) (string, error)
- type OptionFunc
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 (*GSP) GetS3ObjectWithWriter ¶
func (*GSP) PutS3Object ¶
type OptionFunc ¶
type OptionFunc func(*GSP)
func WithLog ¶
func WithLog(log *log.Logger) OptionFunc
Click to show internal directories.
Click to hide internal directories.