Documentation ¶
Index ¶
- Constants
- Variables
- func FormatResponse(response *Response) (ret string)
- func GetURLSafePath(path string) (safePath string, err error)
- func NormPath(path string) string
- type Config
- type Cos
- func (cos *Cos) CreateFolder(bucket, path string) (ret *Response, err error)
- func (cos *Cos) Delete(bucket, path string) (ret []*Response, err error)
- func (cos *Cos) DeleteFile(bucket, path string) (*Response, error)
- func (cos *Cos) DeleteFolder(bucket, path string) (*Response, error)
- func (cos *Cos) DownloadFile(bucket, path, localPath string) (err error)
- func (cos *Cos) DownloadFolder(bucket, path, localPath string) (err error)
- func (cos *Cos) GetAccessURL(bucket, path string) string
- func (cos *Cos) GetAccessURLWithToken(bucket, path string, expireTime int64) string
- func (cos *Cos) GetResURL(bucket, path string) string
- func (cos *Cos) GetSHA(bucket, path string) (ret string, err error)
- func (cos *Cos) IsBucketPublic(bucket string) (ret bool, err error)
- func (cos *Cos) List(bucket, path string, num uint64, pattern string, order int8, context string) (ret *Response, err error)
- func (cos *Cos) Scan(bucket, path string, depth int) (ret []map[string]interface{}, err error)
- func (cos *Cos) SignMore(bucket string, expired int64) string
- func (cos *Cos) SignOnce(bucket, fileID string) string
- func (cos *Cos) StatFile(bucket, path string) (*Response, error)
- func (cos *Cos) StatFolder(bucket, path string) (*Response, error)
- func (cos *Cos) Upload(file io.Reader, bucket, path string) (ret *Response, err error)
- func (cos *Cos) UploadFile(filePath, bucket, path string) (ret *Response, err error)
- func (cos *Cos) UploadFolder(folderPath, bucket, path string) (ret []*Response, err error)
- func (cos *Cos) UploadSlice(file io.ReadSeeker, bucket, path string) (ret *Response, err error)
- type Response
Constants ¶
View Source
const ( COSEndPoint = "http://web.file.myqcloud.com/files/v1/%v/%v/%v" // appid, bucket name, path COSFileEndPoint = "http://%v-%v.file.myqcloud.com/%v" // bucket name, appid, path ExpiredSeconds = 600 ListBoth = "eListBoth" ListFileOnly = "eListFileOnly" ListDirOnly = "eListDirOnly" )
Variables ¶
Functions ¶
func FormatResponse ¶
func GetURLSafePath ¶
Types ¶
type Cos ¶
func (*Cos) CreateFolder ¶
func (*Cos) DownloadFile ¶
func (*Cos) DownloadFolder ¶
func (*Cos) GetAccessURL ¶
func (*Cos) GetAccessURLWithToken ¶
func (*Cos) Scan ¶
Scan scan specified folder or file depth > 0:
scan specified levels
depth < 0:
scan recursively
func (*Cos) UploadFile ¶
func (*Cos) UploadFolder ¶
func (*Cos) UploadSlice ¶
Click to show internal directories.
Click to hide internal directories.