standard

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteObjectsResult

type DeleteObjectsResult struct {
	Space          string
	Local          string
	DeletedObjects []string // Deleted object key list
}

DeleteObjectsResult defines result of DeleteObjects request

type ListObjectsResult

type ListObjectsResult struct {
	XMLName        string
	Prefix         string             // The object prefix
	Marker         string             // The marker filter.
	MaxKeys        int                // Max keys to return
	Delimiter      string             // The delimiter for grouping objects' name
	IsTruncated    bool               // Flag indicates if all results are returned (when it's false)
	NextMarker     string             // The start point of the next query
	Objects        []ObjectProperties // Object list
	CommonPrefixes []string           // You can think of commonprefixes as "folders" whose names end with the delimiter
}

ListObjectsResult defines the result from ListObjects request

type ObjectProperties

type ObjectProperties struct {
	Name         string    `xml:"Contents"`
	Key          string    `xml:"Key"`          // Object key
	Type         string    `xml:"Type"`         // Object type
	Size         int64     `xml:"Size"`         // Object size
	ETag         string    `xml:"ETag"`         // Object ETag
	Owner        Owner     `xml:"Owner"`        // Object owner information
	LastModified time.Time `xml:"LastModified"` // Object last modified time
	StorageClass string    `xml:"StorageClass"` // Object storage class (Standard, IA, Archive)
}

ObjectProperties defines Objecct properties

type Option

type Option func(map[string]optionValue) error

Option HTTP option

type Oss

type Oss interface {
	PutObject(dstPath string, reader io.Reader, options ...Option) error
	PutObjectFromFile(dstPath, srcPath string, options ...Option) error
	GetObject(dstPath string, options ...Option) ([]byte, error)
	GetObjectToFile(dstPath, srcPath string, options ...Option) error
	DeleteObject(dstPath string) error
	DeleteObjects(dstPaths []string, options ...Option) (DeleteObjectsResult, error)
	IsObjectExist(dstPath string) (bool, error)
	ListObjects(options ...Option) (ListObjectsResult, error)
	SignURL(dstPath string, method string, expiredInSec int64, options ...Option) (string, error)
}

type Owner

type Owner struct {
	Name        string `xml:"Owner"`
	ID          string `xml:"ID"`          // Owner ID
	DisplayName string `xml:"DisplayName"` // Owner's display name
}

Owner defines OssBucket/Object's owner

Jump to

Keyboard shortcuts

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