fetch_object

package
v7.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

从指定 URL 抓取指定名称的对象并存储到该空间中

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchedObjectMetadata

type FetchedObjectMetadata = Response

抓取到的文件元信息

type Request

type Request struct {
	FromUrl     string                          // 指定抓取的 URL
	ToEntry     string                          // 指定目标对象空间与目标对象名称,格式为 <目标对象空间>:<目标对象名称>
	Host        string                          // 指定抓取 URL 请求用的 HOST 参数
	Credentials credentials.CredentialsProvider // 鉴权参数,用于生成鉴权凭证,如果为空,则使用 HTTPClientOptions 中的 CredentialsProvider
}

调用 API 所用的请求

type Response

type Response struct {
	Hash       string // 抓取的对象内容的 Etag 值
	ObjectName string // 抓取后保存的对象名称
	Size       int64  // 对象大小,单位为字节
	MimeType   string // 对象 MIME 类型
}

获取 API 所用的响应

func (*Response) MarshalJSON

func (j *Response) MarshalJSON() ([]byte, error)

func (*Response) UnmarshalJSON

func (j *Response) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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