Documentation ¶
Index ¶
- Constants
- Variables
- func CacheExpires(r *http.Response) time.Time
- func CalSignKey(start int64, expire time.Duration, accessSecret string) string
- type APIClient
- type APIKey
- type APIResponse
- type ArchiveApiService
- func (a *ArchiveApiService) VaultsVaultNameArchivesArchiveIDDelete(ctx _context.Context, vaultName string, archiveID string) (*_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameArchivesPost(ctx _context.Context, vaultName string, xCasContentSha256 string, ...) (*_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsGet(ctx _context.Context, vaultName string, ...) (VaultsSummary, *_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsPost(ctx _context.Context, vaultName string, xCasPartSize string, ...) (*_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDDelete(ctx _context.Context, vaultName string, uploadID string) (*_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDGet(ctx _context.Context, vaultName string, uploadID string, ...) (ListParts, *_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPost(ctx _context.Context, vaultName string, uploadID string, ...) (*_nethttp.Response, error)
- func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPut(ctx _context.Context, vaultName string, uploadID string, contentRange string, ...) (*_nethttp.Response, error)
- type BasicAuth
- type Configuration
- type ConfigurationAuthor
- type ConfigurationModeSecret
- type ConfigurationModeSignKey
- type ErrorMessage
- type GenericOpenAPIError
- type JobApiService
- func (a *JobApiService) VaultsVaultNameJobsGet(ctx _context.Context, vaultName string, ...) (JobsList, *_nethttp.Response, error)
- func (a *JobApiService) VaultsVaultNameJobsJobIDGet(ctx _context.Context, vaultName string, jobID string) (...)
- func (a *JobApiService) VaultsVaultNameJobsJobIDOutputGet(ctx _context.Context, vaultName string, jobID string, ...) (JobOutput, *_nethttp.Response, error)
- func (a *JobApiService) VaultsVaultNameJobsPost(ctx _context.Context, vaultName string, ...) (*_nethttp.Response, error)
- type JobArchiveExportInfo
- type JobArchiveExportInfoCondition
- type JobArchiveExportReq
- type JobArchiveImportInfo
- type JobArchiveImportReq
- type JobArchiveListSearchInfo
- type JobArchiveListSearchReq
- type JobArchiveSearchInfo
- type JobArchiveSearchReq
- type JobInventoryRetrievalParameters
- type JobOutput
- type JobOutputArchive
- type JobsList
- type ListParts
- type ListPartsParts
- type NotificationConfiguration
- type OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo
- type Policy
- type PolicyCondition
- type PolicyObject
- type PolicyState
- type PolicyStatePrincipal
- type ServerConfiguration
- type ServerVariable
- type Signature
- type UNKNOWN_BASE_TYPE
- type VaultApiService
- func (a *VaultApiService) CreateVault(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
- func (a *VaultApiService) GetVault(ctx _context.Context, vaultName string) (VaultInfo, *_nethttp.Response, error)
- func (a *VaultApiService) VaultsGet(ctx _context.Context, localVarOptionals *VaultsGetOpts) (VaultsSummary, *_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameAccessPolicyDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameAccessPolicyGet(ctx _context.Context, vaultName string) (Policy, *_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameAccessPolicyPut(ctx _context.Context, vaultName string, ...) (*_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameNotificationConfigurationDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameNotificationConfigurationGet(ctx _context.Context, vaultName string) (NotificationConfiguration, *_nethttp.Response, error)
- func (a *VaultApiService) VaultsVaultNameNotificationConfigurationPut(ctx _context.Context, vaultName string, ...) (*_nethttp.Response, error)
- type VaultInfo
- type VaultsGetOpts
- type VaultsSummary
- type VaultsVaultNameAccessPolicyPutOpts
- type VaultsVaultNameArchivesPostOpts
- type VaultsVaultNameJobsGetOpts
- type VaultsVaultNameJobsJobIDOutputGetOpts
- type VaultsVaultNameJobsPostOpts
- type VaultsVaultNameMultipartUploadsGetOpts
- type VaultsVaultNameMultipartUploadsPostOpts
- type VaultsVaultNameMultipartUploadsUploadIDGetOpts
- type VaultsVaultNameMultipartUploadsUploadIDPutOpts
- type VaultsVaultNameNotificationConfigurationPutOpts
Constants ¶
const ( DefaultSendBufferSize = 8192 DefaultGetBufferSize = 1024 * 1024 * 10 DefaultAuthTimeout = time.Second * 1200 DEFAULT_NORMAL_UPLOAD_THRESHOLD = 100 * 1024 * 1024 // 单文件的默认最大上传阈值 RECOMMEND_MIN_PART_SIZE = 16 * 1024 * 1024 // 推荐的最小分片大小 MAX_PART_NUM = 10000 // 最大的分片数目 MAX_FILE_SIZE = 4 * 10000 * 1024 * 1024 * 1024 //最大支持40TB的文件存储 )
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
func CacheExpires ¶
CacheExpires helper function to determine remaining time before repeating a request.
Types ¶
type APIClient ¶
type APIClient struct { ArchiveApi *ArchiveApiService JobApi *JobApiService VaultApi *VaultApiService ConfigurationAuthor // contains filtered or unexported fields }
APIClient manages communication with the Tecent Cloud Archive Storage Golang SDK. API v1.5.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type ArchiveApiService ¶
type ArchiveApiService service
ArchiveApiService ArchiveApi service
func (*ArchiveApiService) VaultsVaultNameArchivesArchiveIDDelete ¶
func (a *ArchiveApiService) VaultsVaultNameArchivesArchiveIDDelete(ctx _context.Context, vaultName string, archiveID string) (*_nethttp.Response, error)
VaultsVaultNameArchivesArchiveIDDelete Delete Archive Delete Archive 请求实现删除一个 Archive。请求成功以后会返回 x-cas-archive-id 用来表示唯一的 Archive 文件。请求成功返回 204 No Content。在删除 Archive 后,您仍可能成功请求启动对已删除 Archive 的检索任务,但 Archive 检索任务会失败。 在您删除 Archive 时,对相应 Archive ID 正在进行的 Archive 检索可能成功,也可能不成功,具体取决于下面的场景:收到删除 Archive 请求时,Archive 检索任务正在下载 Archive 到缓存池,则 Archive 检索操作可能会失败。 收到删除 Archive 请求时,Archive 检索任务已经下载 Archive 到缓存池,则您将能够下载输出。支持跨账户操作。当操作本账户时,UID 为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param archiveID
func (*ArchiveApiService) VaultsVaultNameArchivesPost ¶
func (a *ArchiveApiService) VaultsVaultNameArchivesPost(ctx _context.Context, vaultName string, xCasContentSha256 string, contentLength string, xCasSha256TreeHash string, body io.Reader, localVarOptionals *VaultsVaultNameArchivesPostOpts) (*_nethttp.Response, error)
VaultsVaultNameArchivesPost Upload Archive Upload Archive 请求实现上传一个 Archive 到指定 Vault。请求成功以后会返回 x-cas-archive-id 用来表示唯一的Archive 文件。请求成功返回 201 Created。上传文件时,可以指定 x-cas-archive-description 用来做文件内容备注。支持跨账户操作。当操作本账户时,UID为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param xCasContentSha256
- @param contentLength
- @param xCasSha256TreeHash
- @param body
- @param optional nil or *VaultsVaultNameArchivesPostOpts - Optional Parameters:
- @param "XCasArchiveDescription" (optional.String) -
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsGet ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsGet(ctx _context.Context, vaultName string, localVarOptionals *VaultsVaultNameMultipartUploadsGetOpts) (VaultsSummary, *_nethttp.Response, error)
VaultsVaultNameMultipartUploadsGet List Multipart Uploads List Multipart Uploads请求实现列出正在进行中的分段上传
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param optional nil or *VaultsVaultNameMultipartUploadsGetOpts - Optional Parameters:
- @param "Limit" (optional.Int64) -
- @param "Marker" (optional.String) -
@return VaultsSummary
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsPost ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsPost(ctx _context.Context, vaultName string, xCasPartSize string, localVarOptionals *VaultsVaultNameMultipartUploadsPostOpts) (*_nethttp.Response, error)
VaultsVaultNameMultipartUploadsPost Initiate Multipart Upload Initiate Multipart Upload请求实现初始化分段上传,此请求将返回一个Upload Id用以后续分段上传,此Upload Id有效期24小时。每次分段上传的段大小要求一致(除了最后一个段),且必须为1 MB乘以2的幂次
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param xCasPartSize
- @param optional nil or *VaultsVaultNameMultipartUploadsPostOpts - Optional Parameters:
- @param "XCasArchiveDescription" (optional.String) -
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDDelete ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDDelete(ctx _context.Context, vaultName string, uploadID string) (*_nethttp.Response, error)
VaultsVaultNameMultipartUploadsUploadIDDelete Abort Multipart Upload Abort Multipart Upload请求实现终止分段上传。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param uploadID
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDGet ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDGet(ctx _context.Context, vaultName string, uploadID string, localVarOptionals *VaultsVaultNameMultipartUploadsUploadIDGetOpts) (ListParts, *_nethttp.Response, error)
VaultsVaultNameMultipartUploadsUploadIDGet List Parts List Parts请求实现列出已上传的数据段。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param uploadID
- @param optional nil or *VaultsVaultNameMultipartUploadsUploadIDGetOpts - Optional Parameters:
- @param "Limit" (optional.Int64) -
- @param "Marker" (optional.String) -
@return ListParts
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPost ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPost(ctx _context.Context, vaultName string, uploadID string, xCasSha256TreeHash string, xCasArchiveSize string) (*_nethttp.Response, error)
VaultsVaultNameMultipartUploadsUploadIDPost Complete Multipart Upload Complete Multipart Upload请求实现结束分段上传,形成文件。发起该请求时必须携带全文件的树形哈希值,服务端将比较用户上传的全文树形哈希和利用已上传分块得到的树形哈希,一致则请求成功,不一致则返回失败
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param uploadID
- @param xCasSha256TreeHash
- @param xCasArchiveSize
func (*ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPut ¶
func (a *ArchiveApiService) VaultsVaultNameMultipartUploadsUploadIDPut(ctx _context.Context, vaultName string, uploadID string, contentRange string, xCasContentSha256 string, xCasSha256TreeHash string, body io.Reader, localVarOptionals *VaultsVaultNameMultipartUploadsUploadIDPutOpts) (*_nethttp.Response, error)
VaultsVaultNameMultipartUploadsUploadIDPut Upload Part Upload Part请求实现上传档案的一段数据。支持乱序上传档案段,支持覆盖已上传的数据段。需在请求中标示该数据段在档案的字节范围。此外,支持并行上传数据段,最多可以上传 10000 段。当x-cas-sha256-tree-hash或x-cas-content-sha256与请求体中的真实文件校验和不一致时,请求返回错误。当Content-Length与请求体中的真实文件大小不一致时,请求返回错误。当Content-Range为必须以初始化分块时对应的块大小严格一致。例如,指定 4 194 304 字节 (4MB) 的段大小,则 0 到 4 194 303 字节 (4MB-1) 以及 4 194 304 (4MB) 到 8 388 607 (8MB-1) 为有效的段范围。2097152( 2MB) 到6291456( 6MB-1)为非法段范围。成功上传段后,将返回 204 No Content
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param uploadID
- @param contentRange
- @param xCasContentSha256
- @param xCasSha256TreeHash
- @param body
- @param optional nil or *VaultsVaultNameMultipartUploadsUploadIDPutOpts - Optional Parameters:
- @param "ContentLength" (optional.String) -
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { Region string `json:"region"` AppId string `json:"appid"` AccessKey string `json:"access_key"` AccessSecret string `json:"access_secret"` SignExpire time.Duration `json:"secret_expire"` SignKey string `json:"sign_key"` SignKeyStart int64 `json:"sign_key_start"` SignKeyEnd int64 `json:"sing_key_end"` BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type ConfigurationAuthor ¶
type ConfigurationModeSecret ¶
type ConfigurationModeSecret struct { AccessKey string AccessSecret string SignExpire time.Duration }
func (*ConfigurationModeSecret) Authorization ¶
type ConfigurationModeSignKey ¶
type ConfigurationModeSignKey struct { AppId string AccessKey string SignKey string SignKeyStart int64 SignKeyEnd int64 SignExpire time.Duration }
func (*ConfigurationModeSignKey) Authorization ¶
type ErrorMessage ¶
type ErrorMessage struct { // 错误码 Code string `json:"code,omitempty"` // 错误信息 Message string `json:"message,omitempty"` // 类型 Type string `json:"type,omitempty"` }
ErrorMessage struct for ErrorMessage
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type JobApiService ¶
type JobApiService service
JobApiService JobApi service
func (*JobApiService) VaultsVaultNameJobsGet ¶
func (a *JobApiService) VaultsVaultNameJobsGet(ctx _context.Context, vaultName string, localVarOptionals *VaultsVaultNameJobsGetOpts) (JobsList, *_nethttp.Response, error)
VaultsVaultNameJobsGet List Job List Jobs 请求实现列出 Vault 的任务,包括正在进行的任务以及最近完成的任务。支持跨账户操作。当操作本账户时,UID为\"-\"。。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param optional nil or *VaultsVaultNameJobsGetOpts - Optional Parameters:
- @param "Completed" (optional.Bool) -
- @param "Limit" (optional.Int64) -
- @param "Marker" (optional.String) -
- @param "Statuscode" (optional.String) -
@return JobsList
func (*JobApiService) VaultsVaultNameJobsJobIDGet ¶
func (a *JobApiService) VaultsVaultNameJobsJobIDGet(ctx _context.Context, vaultName string, jobID string) (OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo, *_nethttp.Response, error)
VaultsVaultNameJobsJobIDGet Describe Job Describe Job 请求实现获取Vault的具体任务信息。支持跨账户操作。当操作本账户时,UID为\"-\"
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param jobID
@return OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo
func (*JobApiService) VaultsVaultNameJobsJobIDOutputGet ¶
func (a *JobApiService) VaultsVaultNameJobsJobIDOutputGet(ctx _context.Context, vaultName string, jobID string, localVarOptionals *VaultsVaultNameJobsJobIDOutputGetOpts) (JobOutput, *_nethttp.Response, error)
VaultsVaultNameJobsJobIDOutputGet Get Job Output 请求用来输出缓存池中检索出来的 Archive 或Archive列表,缓存池中的内容24小时有效。请求所有数据成功后,返回 200 OK。请求部分数据成功时,返回 206 Partial Content。支持跨账户操作。当操作本账户时,UID 为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param jobID
- @param optional nil or *VaultsVaultNameJobsJobIDOutputGetOpts - Optional Parameters:
- @param "Range_" (optional.String) -
@return JobOutput
func (*JobApiService) VaultsVaultNameJobsPost ¶
func (a *JobApiService) VaultsVaultNameJobsPost(ctx _context.Context, vaultName string, localVarOptionals *VaultsVaultNameJobsPostOpts) (*_nethttp.Response, error)
VaultsVaultNameJobsPost Initiate Job Describe Job Initiate Job 请求实现将档案或者档案列表取出到缓存池。操作完成后,用户可以通过 Get Job Output 请求读取对应档案或者档案列表。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param optional nil or *VaultsVaultNameJobsPostOpts - Optional Parameters:
- @param "UNKNOWNBASETYPE" (optional.Interface of UNKNOWN_BASE_TYPE) -
type JobArchiveExportInfo ¶
type JobArchiveExportInfo struct { Action string `json:"Action,omitempty"` JobId string `json:"JobId,omitempty"` JobDescription string `json:"JobDescription,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` CompletionDate time.Time `json:"CompletionDate,omitempty"` Completed bool `json:"Completed,omitempty"` StatusCode string `json:"StatusCode,omitempty"` StatusMessage string `json:"StatusMessage,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` ArchiveId string `json:"ArchiveId,omitempty"` ArchiveSizeInBytes int64 `json:"ArchiveSizeInBytes,omitempty"` ArchiveSHA256TreeHash string `json:"ArchiveSHA256TreeHash,omitempty"` RetrievalByteRange string `json:"RetrievalByteRange,omitempty"` Bucket string `json:"Bucket,omitempty"` Object string `json:"Object,omitempty"` Condition JobArchiveExportInfoCondition `json:"Condition,omitempty"` ArchiveDescription string `json:"ArchiveDescription,omitempty"` }
JobArchiveExportInfo struct for JobArchiveExportInfo
type JobArchiveExportInfoCondition ¶
type JobArchiveExportInfoCondition struct { IfModifiedSince string `json:"If-Modified-Since,omitempty"` IfUmodifiedSince string `json:"If-Umodified-Since,omitempty"` IfMatch string `json:"If-Match,omitempty"` IfNoneMatch string `json:"If-None-Match,omitempty"` }
JobArchiveExportInfoCondition struct for JobArchiveExportInfoCondition
type JobArchiveExportReq ¶
type JobArchiveExportReq struct { // pull-from-cos Type string `json:"Type,omitempty"` Description string `json:"Description,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` Bucket string `json:"Bucket,omitempty"` Object string `json:"Object,omitempty"` Tier string `json:"Tier,omitempty"` Range string `json:"Range,omitempty"` Condition JobArchiveExportInfoCondition `json:"Condition,omitempty"` }
JobArchiveExportReq struct for JobArchiveExportReq
type JobArchiveImportInfo ¶
type JobArchiveImportInfo struct { Action string `json:"Action,omitempty"` JobId string `json:"JobId,omitempty"` JobDescription string `json:"JobDescription,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` CompletionDate time.Time `json:"CompletionDate,omitempty"` Completed bool `json:"Completed,omitempty"` StatusCode string `json:"StatusCode,omitempty"` StatusMessage string `json:"StatusMessage,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` ArchiveId string `json:"ArchiveId,omitempty"` ArchiveSizeInBytes int64 `json:"ArchiveSizeInBytes,omitempty"` ArchiveSHA256TreeHash string `json:"ArchiveSHA256TreeHash,omitempty"` RetrievalByteRange string `json:"RetrievalByteRange,omitempty"` Bucket string `json:"Bucket,omitempty"` Object string `json:"Object,omitempty"` Tier string `json:"Tier,omitempty"` }
JobArchiveImportInfo struct for JobArchiveImportInfo
type JobArchiveImportReq ¶
type JobArchiveImportReq struct { // push-to-cos Type string `json:"Type,omitempty"` Description string `json:"Description,omitempty"` ArchiveId string `json:"ArchiveId,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` RetrievalByteRange string `json:"RetrievalByteRange,omitempty"` Bucket string `json:"Bucket,omitempty"` Object string `json:"Object,omitempty"` Tier string `json:"Tier,omitempty"` }
JobArchiveImportReq struct for JobArchiveImportReq
type JobArchiveListSearchInfo ¶
type JobArchiveListSearchInfo struct { Action string `json:"Action,omitempty"` JobId string `json:"JobId,omitempty"` JobDescription string `json:"JobDescription,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` CompletionDate time.Time `json:"CompletionDate,omitempty"` Completed bool `json:"Completed,omitempty"` StatusCode string `json:"StatusCode,omitempty"` StatusMessage string `json:"StatusMessage,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` InventorySizeInBytes string `json:"InventorySizeInBytes,omitempty"` InventoryRetrievalParameters JobInventoryRetrievalParameters `json:"InventoryRetrievalParameters,omitempty"` }
JobArchiveListSearchInfo struct for JobArchiveListSearchInfo
type JobArchiveListSearchReq ¶
type JobArchiveListSearchReq struct { // archive-retrieval Type string `json:"Type,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` // 默认JSON Format string `json:"Format,omitempty"` Description string `json:"Description,omitempty"` InventoryRetrievalParameters JobInventoryRetrievalParameters `json:"InventoryRetrievalParameters,omitempty"` }
JobArchiveListSearchReq struct for JobArchiveListSearchReq
type JobArchiveSearchInfo ¶
type JobArchiveSearchInfo struct { Action string `json:"Action,omitempty"` JobId string `json:"JobId,omitempty"` JobDescription string `json:"JobDescription,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` CompletionDate time.Time `json:"CompletionDate,omitempty"` Completed bool `json:"Completed,omitempty"` StatusCode string `json:"StatusCode,omitempty"` StatusMessage string `json:"StatusMessage,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` ArchiveId string `json:"ArchiveId,omitempty"` ArchiveSizeInBytes int64 `json:"ArchiveSizeInBytes,omitempty"` ArchiveSHA256TreeHash string `json:"ArchiveSHA256TreeHash,omitempty"` RetrievalByteRange string `json:"RetrievalByteRange,omitempty"` SHA256TreeHash string `json:"SHA256TreeHash,omitempty"` Tier string `json:"Tier,omitempty"` }
JobArchiveSearchInfo struct for JobArchiveSearchInfo
type JobArchiveSearchReq ¶
type JobArchiveSearchReq struct { // archive-retrieval Type string `json:"Type,omitempty"` ArchiveId string `json:"ArchiveId,omitempty"` CallBackUrl string `json:"CallBackUrl,omitempty"` Description string `json:"Description,omitempty"` RetrievalByteRange string `json:"RetrievalByteRange,omitempty"` Tier string `json:"Tier,omitempty"` }
JobArchiveSearchReq struct for JobArchiveSearchReq
type JobInventoryRetrievalParameters ¶
type JobInventoryRetrievalParameters struct { Format string `json:"Format,omitempty"` StartDate string `json:"StartDate,omitempty"` EndDate string `json:"EndDate,omitempty"` Limit string `json:"Limit,omitempty"` Marker string `json:"Marker,omitempty"` }
JobInventoryRetrievalParameters struct for JobInventoryRetrievalParameters
type JobOutput ¶
type JobOutput struct { VaultQCS string `json:"VaultQCS,omitempty"` InventoryDate time.Time `json:"InventoryDate,omitempty"` ArchiveList []JobOutputArchive `json:"ArchiveList,omitempty"` }
JobOutput struct for JobOutput
type JobOutputArchive ¶
type JobOutputArchive struct { ArchiveId string `json:"ArchiveId,omitempty"` ArchiveDescription string `json:"ArchiveDescription,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` Size int32 `json:"Size,omitempty"` SHA256TreeHash string `json:"SHA256TreeHash,omitempty"` }
JobOutputArchive struct for JobOutputArchive
type JobsList ¶
type JobsList struct { JobList []OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo `json:"JobList,omitempty"` Marker string `json:"Marker,omitempty"` }
JobsList struct for JobsList
type ListParts ¶
type ListParts struct { ArchiveDescription string `json:"ArchiveDescription,omitempty"` CreationDate time.Time `json:"CreationDate,omitempty"` Marker string `json:"Marker,omitempty"` MultipartUploadId string `json:"MultipartUploadId,omitempty"` PartSizeInBytes int64 `json:"PartSizeInBytes,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` Parts []ListPartsParts `json:"Parts,omitempty"` }
ListParts struct for ListParts
type ListPartsParts ¶
type ListPartsParts struct { RangeInBytes string `json:"RangeInBytes,omitempty"` SHA256TreeHash string `json:"SHA256TreeHash,omitempty"` }
ListPartsParts struct for ListPartsParts
type NotificationConfiguration ¶
type NotificationConfiguration struct { CallBackUrl string `json:"CallBackUrl,omitempty"` Events []string `json:"Events,omitempty"` }
NotificationConfiguration struct for NotificationConfiguration
type OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo ¶
type OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo struct { *JobArchiveListSearchInfo `json:"-"` *JobArchiveSearchInfo `json:"-"` *JobArchiveExportInfo `json:"-"` *JobArchiveImportInfo `json:"-"` }
func UnmarshalJSON(txt []byte) error func MarshalJSON() ([]byte,error)
func (OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo) MarshalJSON ¶
func (t OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo) MarshalJSON() ([]byte, error)
func (*OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo) UnmarshalJSON ¶
func (t *OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo) UnmarshalJSON(data []byte) error
type Policy ¶
type Policy struct {
Policy string `json:"Policy,omitempty"`
}
Policy struct for Policy
type PolicyCondition ¶
type PolicyCondition struct {
ConditionOperators map[string]interface{} `json:"ConditionOperators,omitempty"`
}
PolicyCondition struct for PolicyCondition
type PolicyObject ¶
type PolicyObject struct { Version string `json:"version,omitempty"` Statement []PolicyState `json:"statement,omitempty"` Action []string `json:"action,omitempty"` Resource []string `json:"resource,omitempty"` }
PolicyObject struct for PolicyObject
type PolicyState ¶
type PolicyState struct { Effect string `json:"effect,omitempty"` Principal PolicyStatePrincipal `json:"principal,omitempty"` }
PolicyState struct for PolicyState
type PolicyStatePrincipal ¶
type PolicyStatePrincipal struct {
Qcs []string `json:"qcs,omitempty"`
}
PolicyStatePrincipal struct for PolicyStatePrincipal
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type Signature ¶
type Signature struct { // 签名算法默认sha1 QSignAlgorithm string `json:"q-sign-algorithm,omitempty"` // 用于标识用户身份, SecretID 的字段,在腾讯云的 API 密钥页面中可以查看。 QAk string `json:"q-ak,omitempty"` // 签名的有效起止时间,其使用10位Unix时间戳来表示,有效效力精确到秒。该字段通过分号区分起止,起时在前、止时在后。 QSignTime int64 `json:"q-sign-time,omitempty"` // 用户可以自定义 SignKey 有效时间,使用 10 位 Unix 时间戳来表示,有效效力精确到秒。该字段通过分号区分起止,起始时间在前、终止时间在后。一般 q-key-time 的时间范围大于等于 q-sign-time。 QKeyTime int64 `json:"q-key-time,omitempty"` // 提供密文中包含需要校验的 Headers 列表,必须是小写字符,且需要按字典序排序,以\";\"分隔 QHeaderList string `json:"q-header-list,omitempty"` // 提供密文中包含需要校验的 Parameters 列表,必须是小写字符,以\";\"分隔 QUrlParamList string `json:"q-url-param-list,omitempty"` // 经过 HMAC-SHA1 算法加密的请求校验信息。 QSignature string `json:"q-signature,omitempty"` }
Signature struct for Signature
type UNKNOWN_BASE_TYPE ¶
type UNKNOWN_BASE_TYPE interface { }
type VaultApiService ¶
type VaultApiService service
VaultApiService VaultApi service
func (*VaultApiService) CreateVault ¶
func (a *VaultApiService) CreateVault(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
CreateVault 创建vault Create Vault 请求实现创建一个 Vault,每个用户支持创建 1000 个 Vault。成功后返回 201 Created。支持跨账户创建。当创建本账户下 valut 时,UID值为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
func (*VaultApiService) GetVault ¶
func (a *VaultApiService) GetVault(ctx _context.Context, vaultName string) (VaultInfo, *_nethttp.Response, error)
GetVault Describe Vault Describe Vault 请求实现读取一个 Vault 的属性。档案数与档案总大小,每日盘点更新,非实时数据。请求成功后返回 200 OK。支持跨账户操作。当操作本账户下 valut 时,UID值为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
@return VaultInfo
func (*VaultApiService) VaultsGet ¶
func (a *VaultApiService) VaultsGet(ctx _context.Context, localVarOptionals *VaultsGetOpts) (VaultsSummary, *_nethttp.Response, error)
VaultsGet List Vaults List Vaults 接口实现列出该账户下所有的文件库。档案数与档案总大小,每日盘点更新,非实时数据。支持跨账户操作。当操作本账户时,UID为\"-\"。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *VaultsGetOpts - Optional Parameters:
- @param "Limit" (optional.Int64) - 指定要返回的文件库最大数目。该值为正整数,取值1-1000,默认为 1000
- @param "Marker" (optional.String) - 按字典序,从该 Marker 开始列出 Vault 的 QCS,如果为空则从头列出 。
@return VaultsSummary
func (*VaultApiService) VaultsVaultNameAccessPolicyDelete ¶
func (a *VaultApiService) VaultsVaultNameAccessPolicyDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
VaultsVaultNameAccessPolicyDelete Delete Vault Access Policy Delete Vault Access Policy 请求删除 Vault 的权限。只支持所有者操作,对应 UID 值为\"-\"。成功后返回 204 No Content。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
func (*VaultApiService) VaultsVaultNameAccessPolicyGet ¶
func (a *VaultApiService) VaultsVaultNameAccessPolicyGet(ctx _context.Context, vaultName string) (Policy, *_nethttp.Response, error)
VaultsVaultNameAccessPolicyGet Get Vault Access Policy 请求读取一个 Vault 的权限 Get Vault Access Policy 请求读取一个 Vault 的权限。只支持所有者操作,对应 UID 值为\"-\"。成功后返回 200 OK。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
@return Policy
func (*VaultApiService) VaultsVaultNameAccessPolicyPut ¶
func (a *VaultApiService) VaultsVaultNameAccessPolicyPut(ctx _context.Context, vaultName string, localVarOptionals *VaultsVaultNameAccessPolicyPutOpts) (*_nethttp.Response, error)
VaultsVaultNameAccessPolicyPut Set Vault Access Policy Set Vault Access Policy 请求实现为一个 Vault 设置权限。具体策略语法参考『认证与鉴权』-『权限管理』只支持所有者设置权限,对应 UID 值为 \"-\"。成功后返回 204 No Content。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param optional nil or *VaultsVaultNameAccessPolicyPutOpts - Optional Parameters:
- @param "Policy" (optional.Interface of Policy) -
func (*VaultApiService) VaultsVaultNameDelete ¶
func (a *VaultApiService) VaultsVaultNameDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
VaultsVaultNameDelete 删除vault Delete Vault 请求实现删除一个 Vault,删除前要求 Vault 下无 Archive 同时无 Archive 写入。删除 Vault 时同时删除其权限信息。请求成功后返回 204 NoContent。支持跨账户删除。当删除本账户下 Valut 时,UID值为\"-\"
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
func (*VaultApiService) VaultsVaultNameNotificationConfigurationDelete ¶
func (a *VaultApiService) VaultsVaultNameNotificationConfigurationDelete(ctx _context.Context, vaultName string) (*_nethttp.Response, error)
VaultsVaultNameNotificationConfigurationDelete Delete Vault Notifications Delete Vault Notifications请求实现删除指定文件库通知回调策略 请求成功,返回 204 No Content
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
func (*VaultApiService) VaultsVaultNameNotificationConfigurationGet ¶
func (a *VaultApiService) VaultsVaultNameNotificationConfigurationGet(ctx _context.Context, vaultName string) (NotificationConfiguration, *_nethttp.Response, error)
VaultsVaultNameNotificationConfigurationGet Get Vault Notifications Get Vault Notifications请求实现读取指定文件库通知回调策略
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
@return NotificationConfiguration
func (*VaultApiService) VaultsVaultNameNotificationConfigurationPut ¶
func (a *VaultApiService) VaultsVaultNameNotificationConfigurationPut(ctx _context.Context, vaultName string, localVarOptionals *VaultsVaultNameNotificationConfigurationPutOpts) (*_nethttp.Response, error)
VaultsVaultNameNotificationConfigurationPut Set Vault Access Policy Set Vault Access Policy 请求实现为一个 Vault 设置权限。具体策略语法参考『认证与鉴权』-『权限管理』 只支持所有者设置权限,对应 UID 值为 \"-\"。成功后返回 204 No Content。
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param vaultName
- @param optional nil or *VaultsVaultNameNotificationConfigurationPutOpts - Optional Parameters:
- @param "NotificationConfiguration" (optional.Interface of NotificationConfiguration) -
type VaultInfo ¶
type VaultInfo struct { CreationDate string `json:"CreationDate,omitempty"` LastInventoryDate string `json:"LastInventoryDate,omitempty"` NumberOfArchives int64 `json:"NumberOfArchives,omitempty"` SizeInBytes int64 `json:"SizeInBytes,omitempty"` VaultQCS string `json:"VaultQCS,omitempty"` VaultName string `json:"VaultName,omitempty"` }
VaultInfo struct for VaultInfo
type VaultsGetOpts ¶
VaultsGetOpts Optional parameters for the method 'VaultsGet'
type VaultsSummary ¶
type VaultsSummary struct { Marker string `json:"Marker,omitempty"` VaultList []VaultInfo `json:"VaultList,omitempty"` }
VaultsSummary struct for VaultsSummary
type VaultsVaultNameAccessPolicyPutOpts ¶
VaultsVaultNameAccessPolicyPutOpts Optional parameters for the method 'VaultsVaultNameAccessPolicyPut'
type VaultsVaultNameArchivesPostOpts ¶
VaultsVaultNameArchivesPostOpts Optional parameters for the method 'VaultsVaultNameArchivesPost'
type VaultsVaultNameJobsGetOpts ¶
type VaultsVaultNameJobsGetOpts struct { Completed optional.Bool Limit optional.Int64 Marker optional.String Statuscode optional.String }
VaultsVaultNameJobsGetOpts Optional parameters for the method 'VaultsVaultNameJobsGet'
type VaultsVaultNameJobsJobIDOutputGetOpts ¶
VaultsVaultNameJobsJobIDOutputGetOpts Optional parameters for the method 'VaultsVaultNameJobsJobIDOutputGet'
type VaultsVaultNameJobsPostOpts ¶
VaultsVaultNameJobsPostOpts Optional parameters for the method 'VaultsVaultNameJobsPost'
type VaultsVaultNameMultipartUploadsGetOpts ¶
VaultsVaultNameMultipartUploadsGetOpts Optional parameters for the method 'VaultsVaultNameMultipartUploadsGet'
type VaultsVaultNameMultipartUploadsPostOpts ¶
VaultsVaultNameMultipartUploadsPostOpts Optional parameters for the method 'VaultsVaultNameMultipartUploadsPost'
type VaultsVaultNameMultipartUploadsUploadIDGetOpts ¶
type VaultsVaultNameMultipartUploadsUploadIDGetOpts struct { Limit optional.Int64 Marker optional.String }
VaultsVaultNameMultipartUploadsUploadIDGetOpts Optional parameters for the method 'VaultsVaultNameMultipartUploadsUploadIDGet'
type VaultsVaultNameMultipartUploadsUploadIDPutOpts ¶
VaultsVaultNameMultipartUploadsUploadIDPutOpts Optional parameters for the method 'VaultsVaultNameMultipartUploadsUploadIDPut'
type VaultsVaultNameNotificationConfigurationPutOpts ¶
type VaultsVaultNameNotificationConfigurationPutOpts struct {
NotificationConfiguration optional.Interface
}
VaultsVaultNameNotificationConfigurationPutOpts Optional parameters for the method 'VaultsVaultNameNotificationConfigurationPut'
Source Files ¶
- api_archive.go
- api_job.go
- api_vault.go
- client.go
- configuration.go
- model_error_message.go
- model_job_archive_export_info.go
- model_job_archive_export_info_condition.go
- model_job_archive_export_req.go
- model_job_archive_import_info.go
- model_job_archive_import_req.go
- model_job_archive_list_search_info.go
- model_job_archive_list_search_req.go
- model_job_archive_search_info.go
- model_job_archive_search_req.go
- model_job_inventory_retrieval_parameters.go
- model_job_output.go
- model_job_output_archive.go
- model_jobs_list.go
- model_list_parts.go
- model_list_parts_parts.go
- model_notification_configuration.go
- model_policy.go
- model_policy_condition.go
- model_policy_object.go
- model_policy_state.go
- model_policy_state_principal.go
- model_signature.go
- model_vault_info.go
- model_vaults_summary.go
- response.go
- signature.go