Documentation ¶
Index ¶
- Constants
- type BatchFilesRequest
- type BatchFilesType
- type Bsauth
- type Cache
- type CacheControls
- type CdnClient
- func (c CdnClient) Flux(req *FluxRequest) (*FluxResponse, error)
- func (c CdnClient) GetDomain(request *GetDomainRequest) (*GetDomainResponse, error)
- func (c CdnClient) GetDomains(req *GetDomainsRequest) (*GetDomainsResponse, error)
- func (c CdnClient) GetTopCountIp(req *GetTopCountIpRequest) (*GetTopCountIpResponse, error)
- func (c CdnClient) GetTopTrafficIp(req *GetTopTrafficIpRequest) (*GetTopTrafficIpResponse, error)
- func (c CdnClient) ModifyHttpsConf(req *ModifyHttpsConfRequest) (*ModifyHttpsConfResponse, error)
- func (c CdnClient) UpdateIpACL(req *UpdateIpACLRequest) (*UpdateIpACLResponse, error)
- type Cert
- type Client
- func (c Client) BatchFiles(req *BatchFilesRequest) error
- func (c Client) Delete(bucket, key string) error
- func (c Client) GetTimestampSignUrl(urlPath url.URL, secretKey string, expiration time.Duration) string
- func (c Client) GetUploadToken(putPolicy storage.PutPolicy) string
- func (c Client) ListFiles(bucket, prefix, delimiter, marker string, limit int) ([]storage.ListItem, []string, string, bool, error)
- func (c Client) MakePublicUrl(domain, key string) string
- func (c Client) PutFile(ctx context.Context, req *PutFileRequest) (*PutRet, error)
- func (c Client) RefreshUrls(urlsToRefresh []string) error
- func (c Client) VerifyCallback(req *http.Request) (bool, error)
- type CreateSslCertRequest
- type CreateSslCertResponse
- type DeliveryBucketFop
- type Domains
- type External
- type FluxRequest
- type FluxResponse
- type FluxResponseDataItem
- type GetDomainRequest
- type GetDomainResponse
- type GetDomainsRequest
- type GetDomainsResponse
- type GetSslCertRequest
- type GetSslCertResponse
- type GetTopCountIpRequest
- type GetTopCountIpResponse
- type GetTopCountIpResponseData
- type GetTopTrafficIpRequest
- type GetTopTrafficIpResponse
- type GetTopTrafficIpResponseData
- type HTTPS
- type IPACL
- type ImageSlim
- type ModifyHttpsConfRequest
- type ModifyHttpsConfResponse
- type PutFileRequest
- type PutRet
- type Range
- type Referer
- type Request
- type SmsClient
- type Source
- type SourceAuthInfo
- type SslClient
- type TimeACL
- type UpdateIpACLRequest
- type UpdateIpACLResponse
- type UserAuthMatchRuleConf
- type UserAuthReqConf
- type UserAuthRespBodyConf
- type UserAuthURLIPLimitConf
- type UserBsauthResultCacheConf
- type Verification
Constants ¶
const Host = "https://api.qiniu.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchFilesRequest ¶ added in v0.0.18
type BatchFilesType ¶ added in v0.0.18
type BatchFilesType string
const ( BatchFilesTypeMove BatchFilesType = "move" BatchFilesTypeCopy BatchFilesType = "copy" BatchFilesTypeRestoreAr = "restoreAr" )
type Bsauth ¶ added in v0.0.29
type Bsauth struct { Path interface{} `json:"path"` Method string `json:"method"` Parameters interface{} `json:"parameters"` TimeLimit int `json:"timeLimit"` UserAuthURL string `json:"userAuthUrl"` Strict bool `json:"strict"` Enable bool `json:"enable"` SuccessStatusCode int `json:"successStatusCode"` FailureStatusCode int `json:"failureStatusCode"` IsQiniuPrivate bool `json:"isQiniuPrivate"` BackSourceWithResourcePath bool `json:"backSourceWithResourcePath"` BackSourceWithoutClientHeaders bool `json:"backSourceWithoutClientHeaders"` ResponseWithSourceAuthCode bool `json:"responseWithSourceAuthCode"` ResponseWithSourceAuthBody bool `json:"responseWithSourceAuthBody"` UserAuthURLIPLimitConf UserAuthURLIPLimitConf `json:"userAuthUrlIpLimitConf"` UserAuthReqConf UserAuthReqConf `json:"userAuthReqConf"` UserAuthContentType string `json:"userAuthContentType"` UserAuthRespBodyConf UserAuthRespBodyConf `json:"userAuthRespBodyConf"` UserBsauthResultCacheConf UserBsauthResultCacheConf `json:"userBsauthResultCacheConf"` UserAuthMatchRuleConf UserAuthMatchRuleConf `json:"userAuthMatchRuleConf"` }
type Cache ¶ added in v0.0.29
type Cache struct { CacheControls []CacheControls `json:"cacheControls"` IgnoreParam bool `json:"ignoreParam"` IgnoreParams []interface{} `json:"ignoreParams"` IncludeParams []interface{} `json:"includeParams"` }
type CacheControls ¶ added in v0.0.29
type CdnClient ¶ added in v0.0.29
type CdnClient struct {
// contains filtered or unexported fields
}
func NewCdnClient ¶ added in v0.0.29
func (CdnClient) Flux ¶ added in v0.0.32
func (c CdnClient) Flux(req *FluxRequest) (*FluxResponse, error)
func (CdnClient) GetDomain ¶ added in v0.0.29
func (c CdnClient) GetDomain(request *GetDomainRequest) (*GetDomainResponse, error)
func (CdnClient) GetDomains ¶ added in v0.0.29
func (c CdnClient) GetDomains(req *GetDomainsRequest) (*GetDomainsResponse, error)
func (CdnClient) GetTopCountIp ¶ added in v0.0.32
func (c CdnClient) GetTopCountIp(req *GetTopCountIpRequest) (*GetTopCountIpResponse, error)
func (CdnClient) GetTopTrafficIp ¶ added in v0.0.32
func (c CdnClient) GetTopTrafficIp(req *GetTopTrafficIpRequest) (*GetTopTrafficIpResponse, error)
func (CdnClient) ModifyHttpsConf ¶ added in v0.0.29
func (c CdnClient) ModifyHttpsConf(req *ModifyHttpsConfRequest) (*ModifyHttpsConfResponse, error)
func (CdnClient) UpdateIpACL ¶ added in v0.0.32
func (c CdnClient) UpdateIpACL(req *UpdateIpACLRequest) (*UpdateIpACLResponse, error)
type Cert ¶ added in v0.0.29
type Cert struct { Certid string `json:"certid"` // 证书名称 Name string `json:"name"` // 通用名称 CommonName string `json:"common_name"` // DNS域名 DnsNames []string `json:"dnsnames"` // 生效时间 NotBefore int64 `json:"not_before"` // 过期时间 NotAfter int64 `json:"not_after"` // 证书私钥 Pri string `json:"pri"` // 证书内容 Ca string `json:"ca"` UID int `json:"uid"` CreateTime int `json:"create_time"` Orderid string `json:"orderid"` ProductShortName string `json:"product_short_name"` ProductType string `json:"product_type"` CertType string `json:"cert_type"` Encrypt string `json:"encrypt"` EncryptParameter string `json:"encryptParameter"` Enable bool `json:"enable"` ChildOrderID string `json:"child_order_id"` State string `json:"state"` AutoRenew bool `json:"auto_renew"` Renewable bool `json:"renewable"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct that represents a Qiniu client. It contains a Mac object for authentication, a CdnManager for CDN operations, and a BucketManager for bucket operations.
func NewClient ¶
NewClient is a function that creates a new Qiniu client. It takes an access key and a secret key as parameters, and returns a pointer to a Client object. The function creates a new Mac object with the access key and secret key, a new CdnManager with the Mac object, and a new BucketManager with the Mac object and a Config object that enables HTTPS. The function then creates a new Client object with the Mac object, the CdnManager, and the BucketManager, and returns a pointer to it.
func (Client) BatchFiles ¶ added in v0.0.18
func (c Client) BatchFiles(req *BatchFilesRequest) error
BatchFiles 批量移动/复制文件
func (Client) Delete ¶
Delete is a method of Client that deletes a specified file. It takes a string representing the bucket where the file is located and a string representing the key of the file as parameters. The method calls the Delete method of the BucketManager object in the Client, passing the bucket and the key. The method returns an error if the Delete method of the BucketManager returns an error.
func (Client) GetTimestampSignUrl ¶ added in v0.0.14
func (Client) GetUploadToken ¶
GetUploadToken is a method of Client that gets an upload token. It takes a PutPolicy object as a parameter. The method calls the UploadToken method of the PutPolicy object, passing the Mac object in the Client. The method returns the upload token as a string.
func (Client) ListFiles ¶ added in v0.0.10
func (c Client) ListFiles(bucket, prefix, delimiter, marker string, limit int) ([]storage.ListItem, []string, string, bool, error)
ListFiles 列举文件,每次最大1000
func (Client) MakePublicUrl ¶ added in v0.0.10
MakePublicUrl 公开空间访问链接
func (Client) RefreshUrls ¶
RefreshUrls is a method of Client that refreshes the cache of the specified URLs. It takes a slice of strings representing the URLs to refresh as a parameter. The method calls the RefreshUrls method of the CdnManager object in the Client, passing the URLs to refresh. The method returns an error if the RefreshUrls method of the CdnManager returns an error.
type CreateSslCertRequest ¶ added in v0.0.29
type CreateSslCertResponse ¶ added in v0.0.29
type DeliveryBucketFop ¶ added in v0.0.29
type Domains ¶ added in v0.0.29
type Domains struct { Name string `json:"name"` Type string `json:"type"` Cname string `json:"cname"` TestURLPath string `json:"testURLPath"` Platform string `json:"platform"` GeoCover string `json:"geoCover"` Protocol string `json:"protocol"` OperatingState string `json:"operatingState"` OperatingStateDesc string `json:"operatingStateDesc"` CreateAt string `json:"createAt"` ModifyAt string `json:"modifyAt"` }
type FluxRequest ¶ added in v0.0.32
type FluxResponse ¶ added in v0.0.32
type FluxResponse struct { Code int `json:"code"` Error string `json:"error"` Time []string `json:"time"` Data map[string]FluxResponseDataItem `json:"data"` }
type FluxResponseDataItem ¶ added in v0.0.32
type GetDomainRequest ¶ added in v0.0.29
type GetDomainRequest struct {
Name string
}
type GetDomainResponse ¶ added in v0.0.29
type GetDomainResponse struct { Name string `json:"name"` PareDomain string `json:"pareDomain"` Type string `json:"type"` Cname string `json:"cname"` TestURLPath string `json:"testURLPath"` Protocol string `json:"protocol"` Platform string `json:"platform"` Product string `json:"product"` GeoCover string `json:"geoCover"` QiniuPrivate bool `json:"qiniuPrivate"` OperationType string `json:"operationType"` OperatingState string `json:"operatingState"` OperatingStateDesc string `json:"operatingStateDesc"` FreezeType string `json:"freezeType"` CreateAt time.Time `json:"createAt"` ModifyAt time.Time `json:"modifyAt"` CouldOperateBySelf bool `json:"couldOperateBySelf"` UIDIsFreezed bool `json:"uidIsFreezed"` OemMail string `json:"oemMail"` TagList interface{} `json:"tagList"` KvTagList interface{} `json:"kvTagList"` IPTypes int `json:"ipTypes"` DeliveryBucket string `json:"deliveryBucket"` DeliveryBucketType string `json:"deliveryBucketType"` DeliveryBucketFop DeliveryBucketFop `json:"deliveryBucketFop"` IsSufy bool `json:"isSufy"` IsPcdnBackup bool `json:"isPcdnBackup"` IsPcdnBackup302 bool `json:"isPcdnBackup302"` Source Source `json:"source"` Bsauth Bsauth `json:"bsauth"` External External `json:"external"` Cache Cache `json:"cache"` Referer Referer `json:"referer"` TimeACL TimeACL `json:"timeACL"` IPACL IPACL `json:"ipACL"` UaACL interface{} `json:"uaACL"` RequestHeaders interface{} `json:"requestHeaders"` ResponseHeaderControls []interface{} `json:"responseHeaderControls"` HTTPS HTTPS `json:"https"` RegisterNo string `json:"registerNo"` ConfigProcessRaTio int `json:"configProcessRa tio"` HurryUpFreecert bool `json:"hurryUpFreecert"` HTTPSOPTime time.Time `json:"httpsOPTime"` Range Range `json:"range"` OperTaskID string `json:"operTaskId"` OperTaskType string `json:"operTaskType"` OperTaskErrCode int `json:"operTaskErrCode"` }
type GetDomainsRequest ¶ added in v0.0.29
type GetDomainsResponse ¶ added in v0.0.29
type GetSslCertRequest ¶ added in v0.0.29
type GetSslCertRequest struct {
CertID string
}
type GetSslCertResponse ¶ added in v0.0.29
type GetTopCountIpRequest ¶ added in v0.0.32
type GetTopCountIpResponse ¶ added in v0.0.32
type GetTopCountIpResponse struct { Code int `json:"code"` Error string `json:"error"` Data GetTopCountIpResponseData `json:"data"` }
type GetTopCountIpResponseData ¶ added in v0.0.32
type GetTopTrafficIpRequest ¶ added in v0.0.32
type GetTopTrafficIpResponse ¶ added in v0.0.32
type GetTopTrafficIpResponse struct { Code int `json:"code"` Error string `json:"error"` Data GetTopTrafficIpResponseData `json:"data"` }
type GetTopTrafficIpResponseData ¶ added in v0.0.32
type ImageSlim ¶ added in v0.0.29
type ImageSlim struct { EnableImageSlim bool `json:"enableImageSlim"` PrefixImageSlims []interface{} `json:"prefixImageSlims"` RegexpImageSlims []interface{} `json:"regexpImageSlims"` }
type ModifyHttpsConfRequest ¶ added in v0.0.29
type ModifyHttpsConfResponse ¶ added in v0.0.29
type PutFileRequest ¶ added in v0.0.18
type Request ¶ added in v0.0.32
type Request struct { Method string ApiUrl string Body []byte Credentials *auth.Credentials }
type SmsClient ¶
type SmsClient struct {
// contains filtered or unexported fields
}
func NewSmsClient ¶
type Source ¶ added in v0.0.29
type Source struct { SourceCname string `json:"sourceCname"` SourceType string `json:"sourceType"` SourceHost string `json:"sourceHost"` TestSourceHost string `json:"testSourceHost"` SourceIPs []string `json:"sourceIPs"` SourceDomain string `json:"sourceDomain"` SourceQiniuBucket string `json:"sourceQiniuBucket"` SourceURLScheme string `json:"sourceURLScheme"` AdvancedSources interface{} `json:"advancedSources"` SkipCheckSource bool `json:"skipCheckSource"` TransferConf interface{} `json:"transferConf"` SourceTimeACL bool `json:"sourceTimeACL"` SourceTimeACLKeys interface{} `json:"sourceTimeACLKeys"` MaxSourceRate int `json:"maxSourceRate"` MaxSourceConcurrency int `json:"maxSourceConcurrency"` AddRespHeader interface{} `json:"addRespHeader"` URLRewrites interface{} `json:"urlRewrites"` SourceRetryCodes interface{} `json:"sourceRetryCodes"` FollowRedirect bool `json:"followRedirect"` Redirect30X interface{} `json:"redirect30x"` SourceRequestHeaderControls interface{} `json:"sourceRequestHeaderControls"` SourceResponseHeaderControls interface{} `json:"sourceResponseHeaderControls"` MaxSourceRatePerIDC int `json:"maxSourceRatePerIDC"` MaxSourceConcurrencyPerIDC int `json:"maxSourceConcurrencyPerIDC"` TestURLPath string `json:"testURLPath"` SourceIgnoreParams []interface{} `json:"sourceIgnoreParams"` SourceIgnoreAllParams bool `json:"sourceIgnoreAllParams"` Range Range `json:"range"` EnableSourceAuth bool `json:"enableSourceAuth"` SourceAuthInfo SourceAuthInfo `json:"sourceAuthInfo"` }
type SourceAuthInfo ¶ added in v0.0.29
type SslClient ¶ added in v0.0.29
type SslClient struct {
// contains filtered or unexported fields
}
func NewSslClient ¶ added in v0.0.29
func (SslClient) CreateSslCert ¶ added in v0.0.29
func (s SslClient) CreateSslCert(ctx context.Context, request *CreateSslCertRequest) (*CreateSslCertResponse, error)
CreateSslCert 上传证书
func (SslClient) GetSslCert ¶ added in v0.0.29
func (s SslClient) GetSslCert(ctx context.Context, request *GetSslCertRequest) (*GetSslCertResponse, error)
GetSslCert 用户获取单个证书的接口
type TimeACL ¶ added in v0.0.29
type TimeACL struct { Enable bool `json:"enable"` TimeACLKeys interface{} `json:"timeACLKeys"` AuthType string `json:"authType"` AuthDelta int `json:"authDelta"` SufyTimeACLKeys interface{} `json:"sufyTimeACLKeys"` SufyCallbackBody interface{} `json:"sufyCallbackBody"` CheckURL string `json:"checkUrl"` AdvanceFunctionEnable bool `json:"advanceFunctionEnable"` RuleType string `json:"ruleType"` Rules interface{} `json:"rules"` Params interface{} `json:"params"` ParamStr string `json:"paramStr"` ToLowerCase string `json:"toLowerCase"` URLEncode string `json:"urlEncode"` HashMethod string `json:"hashMethod"` Verification Verification `json:"verification"` }
type UpdateIpACLRequest ¶ added in v0.0.32
type UpdateIpACLResponse ¶ added in v0.0.32
type UpdateIpACLResponse struct{}
type UserAuthMatchRuleConf ¶ added in v0.0.29
type UserAuthReqConf ¶ added in v0.0.29
type UserAuthReqConf struct { Body interface{} `json:"body"` Header interface{} `json:"header"` Urlquery interface{} `json:"urlquery"` IncludeClientHeadersInBody bool `json:"includeClientHeadersInBody"` }
type UserAuthRespBodyConf ¶ added in v0.0.29
type UserAuthRespBodyConf struct { Enable bool `json:"enable"` ContentType string `json:"contentType"` SuccessConditions interface{} `json:"successConditions"` SuccessLogicalOperator string `json:"successLogicalOperator"` FailureConditions interface{} `json:"failureConditions"` FailureLogicalOperator string `json:"failureLogicalOperator"` }