Documentation
¶
Index ¶
- func MakeBaseUrl(domain, key string) (baseUrl string)
- func URIChangeMime(bucket, key, mime string) string
- func URICopy(bucketSrc, keySrc, bucketDest, keyDest string, force bool) string
- func URIDelete(bucket, key string) string
- func URIMove(bucketSrc, keySrc, bucketDest, keyDest string, force bool) string
- func URIPrefetch(bucket, key string) string
- func URIStat(bucket, key string) string
- type BatchItemRet
- type BatchStatItemRet
- type Client
- func (rs Client) Batch(l rpc.Logger, ret interface{}, op []string) (err error)
- func (rs Client) BatchCopy(l rpc.Logger, entries []EntryPathPair, force bool) (ret []BatchItemRet, err error)
- func (rs Client) BatchDelete(l rpc.Logger, entries []EntryPath) (ret []BatchItemRet, err error)
- func (rs Client) BatchMove(l rpc.Logger, entries []EntryPathPair, force bool) (ret []BatchItemRet, err error)
- func (rs Client) BatchStat(l rpc.Logger, entries []EntryPath) (ret []BatchStatItemRet, err error)
- func (rs Client) ChangeMime(l rpc.Logger, bucket, key, mime string) (err error)
- func (rs Client) Copy(l rpc.Logger, bucketSrc, keySrc, bucketDest, keyDest string, force bool) (err error)
- func (rs Client) Delete(l rpc.Logger, bucket, key string) (err error)
- func (rs Client) Move(l rpc.Logger, bucketSrc, keySrc, bucketDest, keyDest string, force bool) (err error)
- func (rs Client) Stat(l rpc.Logger, bucket, key string) (entry Entry, err error)
- type Entry
- type EntryPath
- type EntryPathPair
- type GetPolicy
- type PutPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBaseUrl ¶
func URIChangeMime ¶
func URIPrefetch ¶ added in v1.7.5
Types ¶
type BatchItemRet ¶
@gist batchItemRet
type BatchStatItemRet ¶
type BatchStatItemRet struct {
Data Entry `json:"data"`
Error string `json:"error"`
Code int `json:"code"`
}
@gist batchStatItemRet
type Client ¶
func NewEx ¶
func NewEx(t http.RoundTripper) Client
func (Client) BatchCopy ¶
func (rs Client) BatchCopy(l rpc.Logger, entries []EntryPathPair, force bool) (ret []BatchItemRet, err error)
func (Client) BatchDelete ¶
func (Client) BatchMove ¶
func (rs Client) BatchMove(l rpc.Logger, entries []EntryPathPair, force bool) (ret []BatchItemRet, err error)
func (Client) ChangeMime ¶
type Entry ¶
type Entry struct {
Hash string `json:"hash"`
Fsize int64 `json:"fsize"`
PutTime int64 `json:"putTime"`
MimeType string `json:"mimeType"`
Customer string `json:"customer"`
}
@gist entry
type PutPolicy ¶
type PutPolicy struct {
Scope string `json:"scope"`
Expires uint32 `json:"deadline"` // 截止时间(以秒为单位)
InsertOnly uint16 `json:"exclusive,omitempty"` // 若非0, 即使Scope为 Bucket:Key 的形式也是insert only
DetectMime uint16 `json:"detectMime,omitempty"` // 若非0, 则服务端根据内容自动确定 MimeType
FsizeLimit int64 `json:"fsizeLimit,omitempty"`
SaveKey string `json:"saveKey,omitempty"`
CallbackUrl string `json:"callbackUrl,omitempty"`
CallbackBody string `json:"callbackBody,omitempty"`
ReturnUrl string `json:"returnUrl,omitempty"`
ReturnBody string `json:"returnBody,omitempty"`
PersistentOps string `json:"persistentOps,omitempty"`
PersistentNotifyUrl string `json:"persistentNotifyUrl,omitempty"`
PersistentPipeline string `json:"persistentPipeline,omitempty"`
AsyncOps string `json:"asyncOps,omitempty"`
EndUser string `json:"endUser,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.