oss

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyClosed = errors.New("already closed")
)

Functions

This section is empty.

Types

type AppendWriter

type AppendWriter struct {
	*Cfg
	Pos           int
	NoDeleteFirst bool
	// contains filtered or unexported fields
}

func NewAppendWriter

func NewAppendWriter() *AppendWriter

func (*AppendWriter) Close

func (w *AppendWriter) Close() error

func (*AppendWriter) Write

func (w *AppendWriter) Write(p []byte) (int, error)

type BlockList

type BlockList struct {
	Latest []string `xml:"Latest"`
}

type Cfg

type Cfg struct {
	URL     string `json:"url"     validate:"required" yaml:"url"`
	Retry   int    `json:"retry"   validate:"gte=1"    yaml:"retry"`
	Timeout int    `json:"timeout" validate:"gte=1"    yaml:"timeout"`
	Ak      string `json:"ak"      yaml:"ak"`
	Sk      string `json:"sk"      yaml:"sk"`
	Region  string `json:"region"  yaml:"region"`
}

func NewCfg

func NewCfg() *Cfg

type CompleteMultipartUpload

type CompleteMultipartUpload struct {
	Parts []*Part `xml:"Part"`
}

type InitiateMultipartUploadResult

type InitiateMultipartUploadResult struct {
	UploadID string `xml:"UploadId"`
}

type MultiPartWriter

type MultiPartWriter struct {
	*Cfg
	// contains filtered or unexported fields
}

func NewMultiPartWriter

func NewMultiPartWriter() *MultiPartWriter

func (*MultiPartWriter) Abort

func (w *MultiPartWriter) Abort() error

func (*MultiPartWriter) Close

func (w *MultiPartWriter) Close() error

func (*MultiPartWriter) Complete

func (w *MultiPartWriter) Complete() error

func (*MultiPartWriter) Write

func (w *MultiPartWriter) Write(p []byte) (int, error)

type Part

type Part struct {
	ETag       string `xml:"ETag"`
	PartNumber int    `xml:"PartNumber"`
}

type Reader

type Reader struct {
	*Cfg
	Pos int
	// contains filtered or unexported fields
}

func NewReader

func NewReader() *Reader

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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