Documentation ¶
Index ¶
Constants ¶
View Source
const ( Z1 = "Z1" // Zeta Protocol Version // Zeta HTTP Header AUTHORIZATION = "Authorization" ZETA_PROTOCOL = "Zeta-Protocol" ZETA_AUTHORIZATION = "X-Zeta-Authorization" ZETA_COMMAND_OLDREV = "X-Zeta-Command-OldRev" ZETA_COMMAND_NEWREV = "X-Zeta-Command-NewRev" ZETA_TERMINAL = "X-Zeta-Terminal" ZETA_OBJECTS_STATS = "X-Zeta-Objects-Stats" ZETA_COMPRESSED_SIZE = "X-Zeta-Compressed-Size" ZETA_PUSH_OPTION_COUNT = "X-Zeta-Push-Option-Count" ZETA_PUSH_OPTION_PREFIX = "X-Zeta-Push-Option-" // ZETA Protocol Content Type ZETA_MIME_BLOB = "application/x-zeta-blob" ZETA_MIME_BLOBS = "application/x-zeta-blobs" ZETA_MIME_MULTI_OBJECTS = "application/x-zeta-multi-objects" ZETA_MIME_METADATA = "application/x-zeta-metadata" ZETA_MIME_COMPRESS_METADATA = "application/x-zeta-compress-metadata" ZETA_MIME_REPORT_RESULT = "application/x-zeta-report-result" ZETA_MIME_JSON_METADATA = "application/vnd.zeta+json" )
View Source
const (
PseudoUserName = "ZetaPseudo"
)
Variables ¶
View Source
var ( ErrNoValidCredentials = errors.New("no valid credentials") ErrRedirect = errors.New("redirect") )
View Source
var (
W = tr.W
)
Functions ¶
Types ¶
type Credentials ¶
func (*Credentials) BasicAuth ¶
func (cred *Credentials) BasicAuth() string
type Downloader ¶
type Downloader interface {
Download(ctx context.Context, o *transport.Representation, offset int64) (transport.SizeReader, error)
}
func NewDownloader ¶
func NewDownloader(verbose bool, insecure bool, proxyURL string) Downloader
type Error ¶
type Error struct { StatusCode int // HTTP status code (200, 403, ...) Code string // OSS error code ("UnsupportedOperation", ...) Message string // The human-oriented error message BucketName string RequestId string HostId string }
Error represents an error in an operation with OSS.
type ErrorCode ¶
type ServiceError ¶
type ServiceError struct { XMLName xml.Name `xml:"Error"` Code string `xml:"Code"` // The error code returned from OSS to the caller Message string `xml:"Message"` // The detail error message from OSS RequestID string `xml:"RequestId"` // The UUID used to uniquely identify the request HostID string `xml:"HostId"` // The OSS server cluster's Id Endpoint string `xml:"Endpoint"` Ec string `xml:"EC"` RawMessage string // The raw messages from OSS StatusCode int // HTTP status code }
ServiceError contains fields of the error response from Oss Service REST API.
Click to show internal directories.
Click to hide internal directories.